//1 - true //0 - false //input is guaranteed to be positive //assume the containing module include math int isPrime(int inVal) { int i; int stopVal = (int)(sqrt( (double)inVal )); for(i=2; i <= stopVal; i=i+1) { if !(inVal % i) { return 0; }//end "if inVal % i is zero" }//end for loop over inval return 1; }//isPrime