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 cosky at 2003-12-07 10:18:53 on Problem 1003
#include <iostream.h>
int main()
{
	double a,j,sum;
	cin>>a;
	while(a>0.01)
	{
		j=2;
		sum=0;
	    while(sum<a)
		{
			sum+=1/j;
			j++;
		}
	    cout<<j-2<<"card<s>"<<endl;
		cin>>a;
        if(a<0.01)break;
	}
	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