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:我做的C

Posted by 820517 at 2004-09-30 12:47:32 on Problem 1003
In Reply To:我做的C Posted by:shutle at 2004-09-08 15:19:39
> void main()
> {
> 	float a,result=0;
> 	int n = 2;
> 	scanf("%f",&a);
> 	while(a!=0)
> 	{
> 		for (n=2,result=0; result<a; n++)
> 		{
> 			result += (float)1 / n;
> 		}	
> 		printf("%d card(s)\n",n-2);
> 		scanf("%f",&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