#include using namespace std; /* Function named isitprime that does the logic in determining prime it returns a true / false for whether or not it is prime. It also assigns the divisor value to the variable divisor from the main body of the program. */ bool isitprime (int testinput, int &testdivisor) { bool primebool; for (testdivisor=2; testinput>=testdivisor ;testdivisor++) { if (testinput == testdivisor) { primebool=true; break; } else if ((testinput%testdivisor) == 0) { primebool=false; break; } } return (primebool); } /* Main body of thr prime program. Has a few checks for valid entry from the user. */ int main() { int input, divisor; bool inputreturn; cout << "Welcome to the Prime Program!\n"; input=10000; for (divisor=2; divisor>input; if (input==0) break; if (input<=1) { cout << input << " is not a valid entry!!! Try again!\n\n"; input=10000; continue; } if (input==2) { cout << input << " is the only even integer that is prime!\n\n"; input=10000; continue; } inputreturn=isitprime(input, divisor); if (inputreturn==true) { cout<