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 cpp00548189 at 2008-03-28 14:34:22 on Problem 1003
#include<iostream.h>
void main()
{
	double a;
    cin>>a; 
    while(a!=0)
	{
		double p = 0;
		for(double i = 1;p < a;i ++)
			p += 1 / (i + 1 );
	    cout<<(i - 1)<<" "<<"card(s)"<<endl;
		cin>>a;
	}
}

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