Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

谁帮我看看哪里错啦!

Posted by 1414732347 at 2010-07-29 19:25:32 on Problem 1552
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator