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:水题,mark

Posted by 15702417336 at 2015-07-29 21:07:12 on Problem 1003
In Reply To:水题,mark Posted by:isjune at 2015-06-04 09:24:28
> #include<stdio.h>
> 
> int main()
> {
> 	float a=0.0;
> 	while(1)
> 	{
> 	    scanf("%f",&a);
> 		float sum=0;
> 		float i=0;
> 		int count=0;
> 		if(a==0.00)
> 		{
> 			break;
> 		}
> 		for(i=2.0;sum<a;i++)
> 		{
> 			sum=sum+1/i;
> 			count++;
> 		}
> 		printf("%d card(s)\n",count);
> 	}
> 	return 0;
> }

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