标签:int src code scanf div bsp scan ++ amp
1 #include<stdio.h> 2 int main() 3 { 4 int n,i,s,j,a[100],w,k; 5 while(scanf("%d",&n)==1) 6 { 7 printf("%d:",n); 8 for (i=2; i<=n; i++) 9 { 10 s=1; 11 for (j=2; j<=i/2; j++) 12 { 13 if (i%j==0) 14 { 15 s+=j; 16 } 17 } 18 if (s==i) 19 { 20 printf(" %d",i); 21 } 22 } 23 printf("\n"); 24 } 25 }
标签:int src code scanf div bsp scan ++ amp
原文地址:http://www.cnblogs.com/domen0814/p/6806447.html