using namespace std;
bool checkPrime(long num){
if(num==1 || num==0){return false;}
for(int i=2;iif(a%i!=0){ //if at any time there's a remainder
return false;
}
}
return true; //if it makes it past the for loop
}
int main( int a ){
cout<<"Enter the number you want to check."<
if(checkPrime(a)){
cout<<"The number was prime."<
else{
cout<<"The number was not prime."<
getchar();
}