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:大牛们帮忙看看为什么在vc6.0上数据都通过了却总是不过呢?#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