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.h> void main() { double a; cin>>a; while(a!=0) { double p = 0; for(double i = 1;p < a;i ++) p += 1 / (i + 1 ); cout<<(i - 1)<<" "<<"card(s)"<<endl; cin>>a; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator