Financial Management POJ - 1004
Financial Management
解题思路:水题。
#include <iostream> #include <cstdio> #include <iomanip> #include <cmath> using namespace std; int main() { double sum=0.0; double now=0.0; while(cin>>now){ sum+=now; for(int i=0;i<11;i++){ cin>>now; sum+=now; } cout<<fixed<<setprecision(2)<<'$'<<sum/12.0<<endl; sum=0.0; break; } return 0; }