View Code of Problem 47

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
	int a, b, c, sum, chen;
	double ave;
	cin >> a>> b>> c;
	sum = a + b + c;
	chen = a*b*c;
	ave = sum / 3.0;
	cout << dec << sum << " " << dec << chen << " " << setprecision(2) << setiosflags(ios::fixed) << ave << endl;
	return 0;
}

Double click to view unformatted code.


Back to problem 47