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 zhilingYu at 2007-12-29 18:10:06 on Problem 1003
#include <iostream>
 using namespace std;
 
 int main (void)
 {
     int c = 0;
     float length = 0.02;
     float i; 
     const float EPSINON = 0.00000000001;
     while ( length > EPSINON && length <= 5.20 )
     {
           float temp = 0.0;
           cin >> length;
           for (c = 0, i = 1.0; temp <= length; c++, i++)
           {
               temp = temp + (1.0 / (i+1));
           }
           cout << c << " card(s)" << endl;
     }
     return 0;
 }
我运行数据基本差不多!但是提交却不成功!请问下是哪里的bug?谢谢!

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