【杭电ACM】1.2.4 Financial Management
http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=1§ionid=2&problemid=71 #include <iostream> 2 using namespace std; 3 4 int main(){ 5 double a[12]; 6 double count = 0; 7 for(int i = 0; i < 12; i ++){ 8 cin >> a[i]; 9 count += a[i]; 10 } 11 cout << '$' << count / 12 <<endl; 12 return 0; 13 }