View Code of Problem 140

#include<stdio.h>
#include<math.h>
#include<string.h>
//#include<algorithm>
//#include <bits/stdc++.h>

using namespace std;

int main() {
	float sum=0;
	int i;
	float temp;
	for(i=0; i<12; i++) {
		scanf("%f",&temp);
		sum=sum+temp;
	}
	printf("$%.2f",sum/12);
}

Double click to view unformatted code.


Back to problem 140