#include<stdio.h>
int main()
{unsigned long long int i=2,n,sum,num,c=0;
printf("\nEnter the range 2 to....:");
scanf("%llu",&n);
for(num=2;num<=n;num++){
sum=1;
for(i=2;i<num;i++)
{
if(num%i==0)
sum=sum+i;
}
if(sum==num){
printf("\nperfect number=%llu",sum);
c++;
}
// else{
// printf("\nThere is no perfect number");
//}
}
printf("\n\n Total perfect number between 2 t0 %llu is=%llu",n,c);
return 0;
}