This site hosts projects related to C, C++, .NET, PHP, MYSQL, Javascript and other programming languages.

Project Title:IsPerfect, Perfect Number

Description: A Perfect number is one whose sum of divisors(excluding itself) is equal to the number itself. For example, "6" is a perfect number because 1+2+3 = 6 (1,2,3 are divisible by 6). To know more, check out the description of wikipedia for Perfect Number. This program checks if a number is perfect or not.

Notes: The project calls a simple function that returns true or false based upon whether the number passsed is perfect or not. The function checks if every number(starting from 2 till its half) is divisible by the given number or not; if it is, its added to the "sum", and if its not , 0 is added. At the end if "sum" equals number passed or equivalently (sum - n ) equals 0, the number is perfect and the function returns true and false otherwise.