题解 | #总成绩和平均分计算#

总成绩和平均分计算

https://ac.nowcoder.com/acm/contest/18839/1024

#include<bits/stdc++.h>            //万能头,或引入#include<iomanip>
using namespace std;
int main()
{
    double a=1.0;
    double b=1.0;
    double c=1.0;
    cin>>a>>b>>c;
    double d=a+b+c;
    double e=d/3;
    cout<<fixed<<setprecision(2)<<d<<" "<<fixed<<setprecision(2)<<e<<endl;
    
}

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务