| ||||||||||
| 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()
{
float c,sum=0;
int n=2;
scanf("%f",&c);
while(c>0.01&&c<5.20){
sum+=1.0/n;
if(sum>c)
break;
n++;
}
if(n!=2)
printf("%.d card(s)\n",n-1);
}
代码如下 总是提示结果错误 求大神指点输出错哪了 求帮忙修正 不胜感激
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator