In this program, you will check whether the number is perfect or not. a positive integer that is equal to the sum of its proper divisors excluding the number itself is called a perfect number.
for example divisor of 6 is 1,2, and 3 sum of divisor 1+2+3=6 hence 6 is the perfect number.
program for Perfect number in C
printf("\n enter the number");
printf("\n %d is perfect number",n);
printf("\n %d is not a perfect number",n);