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)
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.