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 434639789 at 2009-10-24 09:15:04 on Problem 1003
In Reply To:请指教一下,看错在那里? Posted by:qzmc at 2009-07-20 11:54:55
> #include<stdio.h>
void main()
{
	int n=1;
	double len,x=0;
	scanf("%lf",&len);
	while(len)
	{
		x+=(1.0/(n+1));
		if(x>=len) break;
		else n++;
	}
	printf("%d",n);
	printf(" card(s)\n");
}

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