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 |
帮忙看看吧!为什么总是RE?main() {int i,j,k,n; float x; float a[10]; scanf("%f",&x); while(x!=-1) {i=0; k=0; while(x!=0) { a[i++]=x; scanf("%f",&x); } n=i; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(a[i]*2==a[j]||a[i]/2==a[j]) k++; printf("%d\n",k); scanf("%f",&x); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator