Assignment #5 - 94A
Assignment #5 - 94A
ASS5
-----
Develop a program to find and print the first 5 perfect numbers.
A perfect number is a positive integer that is equal to the sum of
all the positive integers (except itself) that divide it evenly. For
example, the number 6 is a perfect number because the integers that divide
it evently are : 1,2,3, and 6. Thus, 6 is the sum of its divisors, except
for 6 itself. Finding the first 3 perfect numbers is easy. Finding the last
two can take time (unless you use math theory, use a book from library). If you
find 4, you will get full marks, If you find 5, you will get a bonus mark.
. Print the numbers as : fprintf("%lu",your_variable_name);
. Define the variable as : unsigned long your_variable_name;
Nikos Soumas