#include<stdio.h>
int main()
{
int n=1,c=3,i,s;
while(c)
{
s=0;
for(i=1;i<n;i++)
if(n%i==0)
s+=i;
if(s==n)
{
printf("%d\t",n);
c--;
}
n++;
}
return 0;
}
#include<stdio.h>
int main()
{
int n=1,c=3,i,s;
while(c)
{
s=0;
for(i=1;i<n;i++)
if(n%i==0)
s+=i;
if(s==n)
{
printf("%d\t",n);
c--;
}
n++;
}
return 0;
}