Due Friday, 1999/10/22
Do one of the following exercises:
Your program should include a function called isperfect() which returns a 1 if the number is perfect, or 0 if it is non-perfect or non-positive. The declaration for your function should look something like this:
int isperfect( int n ) ;
Your program should include a function called isprime() which returns a 1 if the number is prime, or 0 if it is less than 2 or non-prime. The declaration for your function should look something like this:
int isprime( int n ) ;
If you use the sqrt() function, you may need to compile your program using a command like this:
$ cc -o my_prog -lm my_prog.c
The "-lm" tells the compiler to include the "mlib" library when linking your program. "mlib" is the library which contains sqrt().
Copyright © 1999, Ray Ontko (rayo@ontko.com).