Răspuns:
#include <iostream>
using namespace std;
int main()
{
//1
int a,b,c;
cin>>a>>b>>c;
float medie= float(a+b+c)/3;
cout<<medie<<endl;
//2
int d,e;
cin>>d>>e;
cout<<"+ : "<<d+e<<endl;
cout<<"- : "<<d-e<<endl;
cout<<"* : "<<d*e<<endl;
cout<<"/ : "<< float(d)/e<<endl;
//3
int m;
cin>>m;
cout<<float(m)/1000<<" mm"<<endl;
cout<<float(m)/100<<" cm"<<endl;
cout<<float(m)/10<<" dm"<<endl;
cout<<m*10<<" dam"<<endl;
cout<<m*100<<" hm"<<endl;
cout<<m*1000<<" km"<<endl;
return 0;
}
Explicație: