Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

哪位仁兄帮忙看一下为什么是wrong answer.Thank you.

Posted by 00520027 at 2005-12-02 13:56:18 on Problem 1003
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator