#include<stdio.h> #include<conio.h> void main() { int n,s=0,i; clrscr(); printf("ENter the number\n"); scanf("%d",&n); for(i=1;i<n;i++) { if((n%i)==0) { printf("Factors of %d=%d\n",n,i); s=i+s; } } if(s==n) printf("Number is perfect\n"); if(s!=n) printf("Number is not perfect\n"); getch(); }
Are you here to find any programm?? Or something about your smartphone? Or anything about tech.? Welcome,You are at the right place:-)