#include<stdio.h>
void main()
{
int i, sum, num;
for(num = 1; num < 50; num++)
{
for(i = 1, sum = 0; i < num; i++)
{
if(num % i == 0)
sum += i;
}
if(sum == num)
printf("%d ",num);
}
}
Copyright © 2010 C Programs
Icons & Wordpress Theme by N.Design | Blogger Templates by Blog and Web
2 comments: (+add yours?)
Greetings! Do you usually use online social websites?
facebook
Post a Comment