View Code of Problem 47

#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<string>
#include<cmath>

using namespace std;


int main()
{
	int a, b, c;
	cin >> a >> b >> c;

	long sum = a + b + c;
	long cheng = a * b * c;
	double average = sum / 3.0;

	cout << sum << " " << cheng << " ";
	printf("%.2lf", average);
}

Double click to view unformatted code.


Back to problem 47