Explanation: A number is called perfect if sum of its factor is equal to the number itself, e.g., 6; its factors
are 1, 2 and 3 and their sum is 6, which is equal to the number itself, so it is a perfect number.Similarly 28
is a perfect number. In the loop, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.