Name: Anonymous 2007-03-03 20:11 ID:BL8afESO
I know I need to use a loop in this program but I have no idea what to use
problem
The proper divisors of an integer n are the positive integer divisors whose values are less than n. A positive integer is said to be a deficient, perfect, or abundant number if the sum of its proper divisors is, respectively, less than, equal to, or greater than the number. For example, 8 is deficient because its proper divisors are 1, 2, and 4, and 1 + 2 + 4 < 8; The integer 6 is perfect because its proper divisors are 1, 2, and 3, and 1 + 2 + 3 = 6; The integer 12 is abundant because its proper divisors are 1, 2, 3, 4, and 6, and
1 + 2 + 3 + 4 + 6 > 12. Write a program that classifies an integer n as being deficient, perfect, or abundant, for the following values of n:
n = 20 to 30 inclusive
n = 490 to 500 inclusive
n = 8120 to 8130 inclusive
Display your results in a tabular format similar to the following example:
Number classification
8 deficient
6 perfect
12 abundant
problem
The proper divisors of an integer n are the positive integer divisors whose values are less than n. A positive integer is said to be a deficient, perfect, or abundant number if the sum of its proper divisors is, respectively, less than, equal to, or greater than the number. For example, 8 is deficient because its proper divisors are 1, 2, and 4, and 1 + 2 + 4 < 8; The integer 6 is perfect because its proper divisors are 1, 2, and 3, and 1 + 2 + 3 = 6; The integer 12 is abundant because its proper divisors are 1, 2, 3, 4, and 6, and
1 + 2 + 3 + 4 + 6 > 12. Write a program that classifies an integer n as being deficient, perfect, or abundant, for the following values of n:
n = 20 to 30 inclusive
n = 490 to 500 inclusive
n = 8120 to 8130 inclusive
Display your results in a tabular format similar to the following example:
Number classification
8 deficient
6 perfect
12 abundant