| ||||||||||
| 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 "stdafx.h"
#include<iostream>
using namespace std;
int main(int argc, char* argv[])
{
float x,t;
float i;
cin>>x;
while(x)
{
t=0;
for(i=2;;i+=1)
{
t+=1/i;
if(x<=t)
break;
}
cout<<(i-1)<<" "<<"card(s)"<<endl;
cin>>x;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator