top1编程
← 返回题目
题解

【入门】总分和平均分

1 条题解

  • 0
    @ 2026-7-28 22:09:39
    #include<iostream>
    #include <iomanip>
    using namespace std;
    int main(){
    	int x,y,z;
    	cin>>x>>y>>z;
    	cout<<x+y+z<<endl;
    	cout<<fixed<<setprecision(1)<<(x+y+z)/3.0<<endl;
    }
    
    • 1