题目地址:http://poj.org/problem?id=1004
题目大意:12个数求平均数。。。。。。
题目评价:水的一塌糊涂,学完c语言后还不会做的人可以去撞豆腐了。。。。。。
代码:
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
double sum=0;
for(int i=1;i<=12;i++)
{
double temp;
cin>>temp;
sum+=temp;
}
printf("$%.2f\n",sum/12);
return 0;
}