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

编译都通过了啊,可系统确认为错误结果

Posted by KEENIRVANA at 2007-07-12 08:23:03 on Problem 1003
#include <stdio.h>
#include <math.h>
int main()
{
	float c,sum;
    int n;
	scanf("%f",&c);
	
    while ((c>=0.01)&&(c<=5.20)){	
		sum=0;
		for(n=2;sum<c;n++){
			sum+=(float)1/n;
		}
    printf("%d card(s)\n",n-2);
    scanf("%d",&c);
	}
	
}

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