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 dlutwuwei at 2007-09-11 18:28:07 on Problem 1003
In Reply To:输入结果都正确,为什么不能通过呢?请高手指点一下  Posted by:uestczhangchao at 2007-05-22 08:23:26
> #include<iostream>
> using namespace std;
> int main()
> {int i=2;
> float len=0;
> float length;
> int count=0;
> cout<<"input the length of your cards:"<<endl;
>     cin>>length;
> 	if(length!=0.00)
> 	{
> 	for(i=2;len<length;i++)
> 	{
> 	len=len+1.00/i;
> 	count++;
> 	}
> 	}
> if(length>=0.01&&length<=5.2)	
> cout<<count<<" card(s)"<<endl;
>     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