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

runtime error!怎么办呐...

Posted by Dawnee at 2010-11-13 07:58:25 on Problem 1003
int n,i=0,j,num[M];
    double Case[M],sum;
    scanf("%lf",&Case[i]);
    while(Case[i]!=0.00)
    {

        n=2;
        sum=0.00;
        while(sum<Case[i])
        {
            sum+=1.00/n;
            n++;
        }
    num[i]=n-2;
    i++;
    scanf("%lf",&Case[i]);
    }
    for(j=0;j<i;j++)
    printf("%d card(s)\n",num[j]);
    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