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 xl0319 at 2014-04-19 15:46:45 on Problem 1003
In Reply To:贴代码 Posted by:94queen at 2014-04-06 09:44:08
> #include <iostream>
> using namespace std;
> int main()
> {
> 	int n;
> 	float c,sum=0.00;
> 	cin>>c;
> 	while(c!=0.00)
> 	{
> 		for(n=1;sum<=c;n++)
> 		{
> 			sum+=1.0/(n+1);
> 		}
> 		cout<<n-1<<" card(s)"<<endl;
> 		cin>>c;
> 		sum=0;
> 	}
> 	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