need help with changing it so that its only the numbers between, not including the numbers the user chooses. I cant seem to figure it out. It works right now, but it includes the int one and int two sometimes.
#include <iostream>
usingnamespace std;
int main(){
int one;
int two;
cout << "Please enter two different numbers and I will tell you what numbers between are not prime numbers." << endl << endl;
cout << "Enter your first number" << endl;
cin >> one;
cout << "Enter your second number" << endl;;
cin >> two;
while(one <= two){
if(one%2 == 0){
cout << one << " is not a prime number." << endl;
}
elseif((one%3 == 0)&&(one!=3)){
cout << one << " is not a prime number." << endl;
}
elseif((one%5 == 0)&&(one!=5)){
cout << one << " is not a prime number." << endl;
}
elseif((one%7 == 0)&&(one!=7)){
cout << one << " is not a prime number." << endl;
}
one++;
}
system("pause");
}