Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
郁闷啊,明明没错啊,但却WA,请高手们帮帮小弟吧!#include<stdio.h> void main(){ int m,i,sum; scanf("%d",&m); printf("PERFECTION OUTPUT\n"); while(m>0){ sum=0; for(i=1;i<m;i++) if(m%i==0) sum+=i; if(m==sum) printf("%5d PRRFECT\n",m); if(m>sum) printf("%5d DEFICIENT\n",m); if(m<sum) printf("%5d ABUNDANT\n",m); scanf("%d",&m); } printf("END OF OUTPUT\n"); } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator