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:求大神帮我看一下哪里错了 总是通不过 多谢了

Posted by Tonitech at 2013-01-28 03:06:05 on Problem 1003
In Reply To:求大神帮我看一下哪里错了 总是通不过 多谢了 Posted by:221100225 at 2012-02-22 23:19:45
> #include <stdio.h>
> int main (void)
> {
> 	float x,y;
> 	int i,j;
> 	int a[300];
> 	j=-1;
> 	while((scanf("%f",&x))==1&&x!=0.00)
> 	{
> 		y=0;
> 		++j;
> 		for(i=1;y<x;i++)
> 		{
> 			y+=1/float(i+1);
> 		}
> 		printf("%d  card(s)\n",i-1);
> 	}
> 	
> 	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