CodePudding user response:
I am absolutely won't help you write your homework!In addition, if you really want to find a ready-made, can go to the online search for the keyword, or combined with C language, must complete code can be found
CodePudding user response:
#includeInt main ()
{
Int I, j, n.
The scanf (" % d ", & amp; N)
for(i=1; i<=n; I++)
{
int sum=0;
For (j=1; j
{
If (I % j==0) sum +=j;
}
If (sum==I) printf (" % d \ n ", I);
}
return 0;
}
There may be a wrong, I don't have the test, I didn't write carefree get boring