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 |
求助!!#include <stdio.h> int main() { int a[16],i,j,k,p,n; while (1) { n=0; for (i=1;i<16;i++) { scanf ("%d",&a[i]); if (a[1]==-1) { exit (1); } else if (a[i]==0) { k=i; break; } } for (i=1;i<k;i++) { p=2*a[i]; for (j=1;j<k;j++) if (p==a[j]) { n++; continue; } } printf ("%d\n",n); } } 错哪了? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator