Program 1: Write a program that generates one integer between 1 and 1000 and finds the sum
and average of the PROPER divisors of the generated number and check if the number is abundant or
not.
Definition: an abundant number or excessive number is a number for which the sum of PROPER divisors
is larger than the number itself.
Write 2 versions of the program: one using loop FOR and one using
loop WHILE
Examples:
12 is abundant, since the sum of the proper divisors is 1+2+3+4+6=16 > 12
20 is abundant, since the sum of the proper divisors is 1+2+4+5+10=22 > 20
6 is NOT abundant, since the sum of proper divisors is 1+2+3 = 6 and it is NOT larger than 6
10 is not abundant, since the sum of proper divisors is 1 + 2 + 5 = 8 < 10
Program 2 Write a program that reads a sequence of characters. First '$' will terminate the input and find the percent of '+' and '-' in the input sequence.