You are on page 1of 1

Ap2.

Create a new class: Lab_07_2_surname_name

Reads a series of positive integers and check for perfect numbers.

A perfect number is a positive integer that is equal to the sum of its proper positive divisors,
that is, the sum of its positive divisors excluding the number itself. Example: 28 = 1 + 2 + 4
+ 7 + 14

The numbers will be introduced in a do … while loop, at the end of the loop the user will be
asked if he want to introduce more numbers and will respond with y (yes) or n (no)

You might also like