| ||||||||||
| 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 | |||||||||
哪位仁兄帮忙看一下为什么是wrong answer.Thank you.#include<stdio.h>
void main()
{
int i=2;
float n=0.0,m=1.0,b;
while(m!=0.0){
scanf("%f",&m);
if(m>5.20||m<0.01)
printf("\n");
else{
do
{
b=(float)1/i;
n=n+b;
i++;
}while(n<=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