Question: Write a program that prints perfect numbers between 1 and 100. A perfect number is a whole integer number greater than zero; and when you
Write a program that prints perfect numbers between 1 and 100. A perfect number is a whole integer number greater than zero; and when you add up all of the factors less than that number, you get that same number. Examples: The factors of 6 are 1, 2, 3 and 6 1 +2+3-6 The factors of 28 are 1, 2, 4, 7, 14 and 28. 1 +2+47+14 28 Sample screenshot: This output is done by Your name goes here 6 is a perfect number 28 is a perfect number End of Progran Press any key to continue .. The perfect numbers between 1 and 100 are
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
