| ||||||||||
| 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 | |||||||||
请帮忙看看吧。老是WA#include<iostream>
using namespace std;
int main()
{
float a,s;
int n,i;
cin>>a;
while((int(a*100)!=0))
{
n=0;
s=0;
while(int(s*100)<int(a*100))
{
n++;
s=s+1.0/(n+1);
}
cout<<n<<" card(s)"<<endl;
cin>>a;
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator