| ||||||||||
| 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 | |||||||||
1003#include<stdio.h>
int main()
{
double x,sum=0.0;
int n=2;
do
{
scanf("%lf",&x);
while(x-sum>0)
{sum=sum+1.0/n;
n++;
}
printf("%d card(s)\n",n-2);
}while(x!=0.00);
return(0);
}
哪里错了?
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator