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 3L_3L at 2008-09-23 15:26:50 on Problem 1003
#include<iostream.h>
void main()
{	double a,b,i,j;
	while(cin>>a&&a!=0)
	{	j=0;b=0;
		for(i=2;;i++)
		{	b+=1/i;
			j++;
			if(b>=a)break;
		}
		cout<<j<<" card(s)"<<endl;
	}
}

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