题解 | #总成绩和平均分计算#
总成绩和平均分计算
https://ac.nowcoder.com/acm/problem/21459
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float a=0;
float b=0;
float c=0;
cin>>a>>b>>c;
float Sum=a+b+c;
float Avg=(a+b+c)/3.0;
cout<<fixed<<setprecision(2)<<Sum<<" "<<Avg<<endl;
return 0;
}
查看16道真题和解析