算法竞赛 习题 1-1 平均数(average)
easy
输入三个整数,输出他们的平均值。
Thought:
数值转换的技巧
Code:
#include <bits\stdc++.h>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
double res;
res = (a+b+c)/3.0;
cout << res << endl;
}
Output: