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

怎么会wa?郁闷~大虾们帮我找找错误吧~

Posted by RJXY0711 at 2007-08-04 08:57:18 on Problem 2413
#include<stdio.h>
void main()
{
 int i,sum;
 double a,b,c[480];
 c[0]=1;c[1]=2;
 for(i=2;i<480;i++)
 c[i]=c[i-1]+c[i-2];
while(1)
    {
     scanf("%lf%lf",&a,&b);
     if(b==0) break;
     else
     {
     sum=0;
     for(i=0;i<480;i++)
       if(c[i]>=a&&c[i]<=b)  sum++;
            else if(c[i]>b) break;
       printf("%d\n",sum);
     }
    }
}

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