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

Re:都改成DOUBLE试试

Posted by LIANGLIANG at 2004-12-09 22:11:01 on Problem 1003
In Reply To:大家谁有能力帮我呀? Posted by:piaofushi919 at 2004-12-09 21:48:32
> #include <stdio.h>
> #include <math.h>
> void main()
> {
> 	float a,sum;
>     int n;
> 	scanf("%f",&a);
> 	while (a!=-1){	
> 		sum=0;
> 		for(n=2;sum<a;n++){
> 			sum+=(float)1/n;
> 		}
>     printf("%d card(s)\n",n-2);
>     scanf("%d",&a);
> 	}
> }

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