The document contains a Java program that checks whether a given number is a perfect number. It prompts the user to enter a number, calculates the sum of its divisors, and determines if the sum equals the original number. The program provides output indicating whether the entered number is a perfect number or not.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views2 pages
Java2
The document contains a Java program that checks whether a given number is a perfect number. It prompts the user to enter a number, calculates the sum of its divisors, and determines if the sum equals the original number. The program provides output indicating whether the entered number is a perfect number or not.