poj 1004 Financial Management 解题报告

求12个月工资的平均数。这个题的难度和1001差不多吧

1 #include <iostream>
2  using namespace std;
3
4
5  int main()
6 {
7 int n=12;
8 float sum=0.0;
9 float a;
10 while(n--)
11 {
12 cin>>a;
13 sum+=a;
14 }
15 cout<<"$"<<sum/12<<endl;
16
17
18 return 0;
19 }
原文地址:https://www.cnblogs.com/andyidea/p/poj1004.html