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 laEiffel at 2011-03-14 20:33:10 on Problem 1003
# include<stdio.h>
# define N 10
int main()
{
     int i = 0;
	float a[N];
	do
	{
		scanf("%f",&a[i++]);
	}while(a[i-1]!=0.00&&a[i-1]<=5.20&&a[i-1]>=0.01);

	for(int j = 0;j<i-1;j++)
	{
		float sum=0.00;
		for(int n=1;sum<a[j];n++)
			sum+=1.0/(n+1);

		printf("%d cards\n",n-1);
	}
	return 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