chapter5
This commit is contained in:
18
DeitelC/Chapter5/isPerfectDemo.c
Normal file
18
DeitelC/Chapter5/isPerfectDemo.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include "isPerfect.c"
|
||||
|
||||
int main(void) {
|
||||
/*puts("Enter a int!");
|
||||
int num;
|
||||
scanf("%d", &num);
|
||||
|
||||
printf("%d\n", isPerfect(num));*/
|
||||
|
||||
for(int i = 0; i < 1000; i++) {
|
||||
if(isPerfect(i)) {
|
||||
printf("%d ", i);
|
||||
}
|
||||
}
|
||||
puts("");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user