| ||||||||||
| 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 | |||||||||
Re:请各位大哥大姐,帮我看一下我这个哪里错了,这题不就是求12个数的平均数吗?为什么交上去错了。小弟在此多谢了。In Reply To:请各位大哥大姐,帮我看一下我这个哪里错了,这题不就是求12个数的平均数吗?为什么交上去错了。小弟在此多谢了。 Posted by:mgb at 2007-07-19 15:05:41 > #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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator