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

请各位大哥大姐,帮我看一下我这个哪里错了,这题不就是求12个数的平均数吗?为什么交上去错了。小弟在此多谢了。

Posted by mgb at 2007-07-19 15:05:41 on Problem 1004
#include<math.h>
#include<stdio.h>
void main()
{int i;
float mon[13],m=0.00,n;
printf("input  the balances of the twelve months\n");
for(i=1;i<13;i++)
{
scanf("%f",&mon[i]);
printf("%f\n",mon[i]);
m=m+mon[i];
}
n=m/12;
printf(" %f",n);
}

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