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