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

帮忙看看吧!为什么总是RE?

Posted by 88899 at 2006-08-29 10:53:33 on Problem 1552
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:
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