#include<bits/stdc++.h>
using namespace std;
class dog{
public:
void message(){
cin>>age>>weight;
cout<<"dog age:"<<age<<' '<<"years"<<'\n';
cout<<"dog weight:"<<weight<<' '<<"kg"<<'\n';
}
private:
int age,weight;
};
int main(){
dog aw;
aw.message();
return 0;
}
#include<bits/stdc++.h>
using namespace std;
class rectangle{
public:
void getarea(){
cin>>x>>y>>i>>j;
cout<<"矩形的面积是:"<<fabs(i-x)*fabs(j-y)<<'\n';
}
private:
double x,y,i,j;
};
int main(){
rectangle zuobiao;
zuobiao.getarea();
return 0;
}
#include<bits/stdc++.h>
using namespace std;
class rectangle{
public:
void getarea(){
cin>>wide>>len;
cout<<"矩形的面积是:"<<wide*len<<'\n';
}
private:
double wide,len;
};
int main(){
rectangle wl;
wl.getarea();
return 0;
}
#include<bits/stdc++.h>
using namespace std;
class Circle{
public:
void Getarea(){
cin>>Radius;
cout<<"圆的面积:"<<3.14*Radius*Radius<<'\n';
}
private:
double Radius;
};
int main(){
Circle Radius;
Radius.Getarea();
return 0;
}