Perfect number cousins
6 is a perfect number. but 220 and 284 are perfect number cousins. because the sum of the divisors of 220 is 284 and the sum of the divisors of 28 is 220. so they are called perfect number cousins. write a program that finds and writes perfect numbers and perfect number cousins UP TO FIVE to the file Perfect.out
(for example: 12496-->14288-->15472-->14536-->14264-->12496 are perfect cousin numbers)

In what way?

It looks like you are just copying your homework question to the forum.
This is your home work. Not ours!
You will not learn anything by just repeating what others have told you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.