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 s[20],i,j,k,a,b; scanf("%d",&s[0]); while(s[0]!=-1) { k=0; for(i=0;s[i]>0;) scanf("%d",&s[++i]); for(j=0;j<i-1;j++) { for(b=0;b<i-1;b++) if(s[b]==2*s[j]) k++; } printf("%d\n",k); scanf("%d",&s[0]); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator