题目链接:http://vjudge.net/problem/HDU-1064
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 6 int main() 7 { 8 int i; 9 double a,sum=0.0; 10 for(i=1;i<=12;i++) 11 { 12 scanf("%lf",&a); 13 sum+=a; 14 } 15 printf("$%.2lf\n",sum/=12.0); 16 return 0; 17 }