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 chenjinling211 at 2007-06-16 14:48:54 on Problem 1003
In Reply To:Re:帮忙看一下那里有错误? Posted by:sunlight13 at 2007-01-26 16:27:53
> #include<stdio.h>
> 
> main()
> {
>    int i=0,j=0,flag=1,card=1;
>    float len[100],needlen=0;
>          
>    while(flag==1)   {
>       scanf("%f",&len[i]);
>       if(len[i]==0.00)
>          flag=0;
>       i++;
>    }
>    for(j=0;j<=i-2;j++)   {
>       while(len[j]>=needlen)   {
>          needlen=needlen+(float)1/(card+1);
>          card++;
>       }
>    printf("%d card(s)",card-1);
>    }
>    system("pause");
> }

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