105 if(ULONG_MAX == 4294967295UL)
107 if(primeNum > (ULONG_MAX-4))
112 if(primeNum > (ULONG_MAX-59))
120 if(((primeNum%2) == 0) && (primeNum != 2))
153 if(input > (ULONG_MAX-2))
160 if(input%2 == 0 || input <= 1)
171 for(i=3; i<=(
ULONG)sqrt((
double)input); i+=2)
185 int main(
int argc,
char **argv)
193 if(sscanf(argv[1],
"%lu", &input))
197 if(input == nextPrime)
199 printf(
"The input number was prime %lu\n",
202 else if(nextPrime == 0)
204 printf(
"The input number was out of range %lu\n",
209 printf(
"The prime number following %lu is %lu\n",
int main(int argc, char **argv)
BOOL blIsPrime(ULONG input)
Prototypes, etc. for maths utility routines.
System-type variable type definitions.
ULONG blFindNextPrime(ULONG primeNum, BOOL above)