#include <stdio.h> main() { int i,n,s; s=0; scanf("%d",&n); for(i=1;i<n;i++) if(n%i==0) s=s+i; if(s==n) printf("%d是完数",n); else printf("%d不是完数",n); getchar(); }
标签:main,判断,int,scanf,C语言,完数,include From: https://www.cnblogs.com/xkdn/p/17064416.html
#include <stdio.h> main() { int i,n,s; s=0; scanf("%d",&n); for(i=1;i<n;i++) if(n%i==0) s=s+i; if(s==n) printf("%d是完数",n); else printf("%d不是完数",n); getchar(); }
标签:main,判断,int,scanf,C语言,完数,include From: https://www.cnblogs.com/xkdn/p/17064416.html