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 wushengdexiao at 2009-05-10 21:06:31 on Problem 1003
In Reply To:做成这样为什么还是错的? Posted by:xiaomage_cool at 2009-02-23 23:53:23
> #include<stdio.h>
> #include<math.h>
> int main()
> {
>       float m;
>       float n = 0;
>       int i; 
>       while(1)
>       {  
>           scanf("%f",&m);  
>           if (m == 0.00)
>              return 0;
>           else 
>           {
>              for(i=2;n<m;i++)
>              {
>                   n += 1.0/i;           
>               }
>               n = 0;
>           }   
>           printf("%d\n",i-2);                       
>            
>       }
> }

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