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 |
Re:谁看看这个那里错了啊~~郁闷死了~~~In Reply To:谁看看这个那里错了啊~~郁闷死了~~~ Posted by:3L_3L at 2008-09-23 15:26:50 > #include<iostream.h> > void main() > { double a,b,i,j; > while(cin>>a&&a!=0) > { j=0;b=0; > for(i=2;;i++) > { b+=1/i; > j++; > if(b>=a)break; > } > cout<<j<<" card(s)"<<endl; > } > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator