Computer Science 2611
Summer 1999
Laboratory Assignment 3
For this assignment, modify your solution to laboratory assignment 1,
part 2, which reads a number k and prints the first k perfect numbers.
Add a function called isPerfect that takes a number n and tells whether
that number is perfect. It should return 1 if n is perfect, and 0 if
n is not perfect. It should begin like this.
bool isPerfect(int n)
Include a clear and concise contract for function isPerfect.
Write your main function so that it uses function isPerfect rather
than doing the computation itself. The main program should become
quite a bit simpler and easier to read.
Test your solution. Turn in a printed copy of your program.