求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 }

相关文章:

  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2022-01-25
  • 2021-06-09
  • 2022-01-07
  • 2021-08-26
猜你喜欢
  • 2021-06-06
  • 2021-11-10
  • 2021-10-09
  • 2022-12-23
  • 2021-11-16
相关资源
相似解决方案