Perfect Number Program in C

This Perfect Number Program in C post provides implementation program that checks whether the given input number is Perfect Number or Not using C language syntax. This post is also providing the flow chart for Perfect Number Program to make you more clear the logic.

Definition: Sum of factors of given number except itself is equal to the same number

void main()
int n , i, sum=0 ;
printf(“Enter an integer : “);
scanf(“%d”, &n);
for(i=1 ; i<n ; i++)
sum = sum+i ;
printf(“Perfect Number”);
printf(“Not a Perfect Number”);

FlowChart :

Perfect Number program FlowChart

Perfect Number FlowChart

Share this