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 hubo1016 at 2005-04-20 21:44:29 on Problem 1003
In Reply To:大家帮我看一下错在哪?谢谢 Posted by:cosky at 2003-12-07 10:18:53
> #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;
> }
a=0.01怎么办

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