| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
请过的大侠帮忙看一下哪个地方错了#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator