#include<iostream>
using namespace std;
class Circle
{
double r,cs;
public:
void radius_input()
{
cout<<"please input r:";
cin>>r;
}
void c_area_out()
{
cs=3.14*r*r;
cout<< cs <<endl;
}
};
int main()
{
Circle c1;
c1.radius_input();
c1.c_area_out();
return 0;
}
作业3.22
最新推荐文章于 2024-03-24 21:35:17 发布