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

请过的大侠帮忙看一下哪个地方错了

Posted by 200531500031 at 2006-04-11 18:58:12 on Problem 2601
#include <stdio.h>

int main(void)
{
        int n,i,j;
        double a,b,c;
        while(scanf("%d",&n) != EOF)
        {
                if(n == 0)
                {
                        printf("0.00\n");
                        continue;
                }
                else
                {
                        double sum = 0;
                        scanf("%lf%lf",&a,&b);
                        j = n;
                        while(j--)
                        {
                                scanf("%lf",&c);
                                sum += c;
                        }
                        printf("%.2lf\n",(b + n * a)/(n + 1) - sum);
                }
        }
        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