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:大家帮帮忙 为什么 总是compile

Posted by smileallthetime at 2008-12-11 23:49:54 on Problem 1003
In Reply To:大家帮帮忙 为什么 总是compile Posted by:072988 at 2008-12-04 15:25:45
> #include <stdio.h>
> int  main()
> {
>  float a=0.0,c;
>  long int i,b,term=1;
>  while (term>0)
>  {
>    scanf("%f",&c);
>    if(c==0.00)
> 	   break;
>    else if(c>0.00 && c<=0.5)
> 	   b=1;
>    else
>    {
>     for(i=2;;i++)
>     {
>      a=a+1.0/i;
> 	 if(a>c)
> 		 break;
> 	 b=i;
> 	}
>    }
>    printf("%ld\n",b);
>    term++;
>    a=0;
>  }
>  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