Translate

Labels

Showing posts with label GENERATE PERFECT NUMBER. Show all posts
Showing posts with label GENERATE PERFECT NUMBER. Show all posts

Wednesday, 12 June 2013

PROGRAM TO GENERATE PREFECT NUMBERS

main()
{
int n,i,sum=0,count=0;
for(n=4; ;n++)
{
sum=0;
for(i=1;i<n/2;i++)
{
if((n%i)==0)
sum+=i;
}