The Modern C# Challenge
上QQ阅读APP看书,第一时间看更新

18. Perfect numbers

A perfect number equals the sum of its divisors. Basically, a perfect number is amicable with itself. For example, the divisors of 6 are 1, 2, and 3, and 6 = 1 + 2 + 3.

Write a program that finds perfect numbers between 1 and a specified maximum.