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.
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.