| ||||||||||
| 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:KEENIRVANA at 2007-07-12 08:23:03 > #include <stdio.h>
> #include <math.h>
> int main()
> {
> float c,sum;
> int n;
> scanf("%f",&c);
>
> while ((c>=0.01)&&(c<=5.20)){
> sum=0;
> for(n=2;sum<c;n++){
> sum+=(float)1/n;
> }
> printf("%d card(s)\n",n-2);
> scanf("%d",&c);
> }
>
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator