【POJ】【P1004】【Financial Management】【题解】【水题】

来源:互联网 发布:大数据北京培训机构 编辑:程序博客网 时间:2024/06/05 18:25

传送门:http://poj.org/problem?id=1004

题意:求12个数的平均数

水x2

/*ID:iamzkyOJ:POJIndex:1004Language:C++*/#include<iomanip>#include<iostream>using namespace std;int main(){double s=0;double x;while(cin>>x)s+=x;cout<<"$"<<fixed<<setprecision(2)<<s/12.0<<endl;return 0;}




0 0
原创粉丝点击