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() {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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator