Friday, January 3, 2020

POJ.1004 Financial Management


Problem Link:
http://poj.org/problem?id=1004

Idea:
n/a

Source:
 int main()  
 {  
  double d[12];  
  double sum = 0;  
  for (int i = 0; i < 12; i++) {  
  cin >> d[i];  
  sum += d[i];  
  }  
  cout << "$";  
  cout << fixed << std::setprecision(2) << sum / 12 << endl;  
  return 0;  
 }  

No comments:

Post a Comment