View Code of Problem 140

#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
    double sum = 0, tmp;
    for (int i = 0; i < 12; i++)
    {
        cin >> tmp;
        sum += tmp;
    }
    printf("$%.2lf\n", sum / 12);
    return 0;
}

Double click to view unformatted code.


Back to problem 140