| ||||||||||
| 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,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