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 cugwei at 2004-04-23 16:06:53 on Problem 1003
In Reply To:郁闷!哪位兄弟帮忙看一下错在哪儿? Posted by:cugwei at 2004-04-23 16:03:24
> #include<math.h>
> main()
> {int i=3,N=2;
>  float sum=0.5,c;
>  scanf("%2f",&c);
>  while(c>=0.01&&c<=5.20&&c!=0.00)
>     /*上面可能有问题,因为我在本地测试时,输入0.01无法出现答案,但我不确定*/
>    {while(c>sum)
> 	{sum+=(float)1/i;
> 	 i++;
> 	 N++;
> 	}
>     printf("%d card(s)\n",N-1);
>     break;
>    }   
>  }
> 很郁闷啊!一直报错!

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