Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
请问大家我的代码有什么问题?谢谢#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator