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:1003:大牛们帮忙看看为什么在vc6.0上数据都通过了却总是不过呢?In Reply To:1003:大牛们帮忙看看为什么在vc6.0上数据都通过了却总是不过呢? Posted by:ACM_dlutlengqian at 2008-11-05 19:25:12 > #include<stdio.h> > void main() > { > float c,m,sum=0; > int i; > do > scanf("%f",&c); > while(c<=0.0||c>5.20); > for(i=2;sum<c;i++) > {m=1.0/i; > sum+=m;} > printf("%d card(s)\n",i-2); > } > 要求可以测试多组数据 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator