很简单的基础题。
#include<stdio.h> #include<iostream> using namespace std; int main() { double a,b,c; cin>>a>>b>>c; double sum,avg; sum=a+b+c; avg=sum/3; printf("%.2f",sum); cout<<" "; printf("%.2f",avg); return 0; }
点个赞吧,谢谢~~
#include<stdio.h> #include<iostream> using namespace std; int main() { double a,b,c; cin>>a>>b>>c; double sum,avg; sum=a+b+c; avg=sum/3; printf("%.2f",sum); cout<<" "; printf("%.2f",avg); return 0; }
点个赞吧,谢谢~~