#include<iostream>
using namespace std;
class Circle
{
double r;
double a;
public:
Circle(int i){r=i;}
void c_area_display()
{
a=3.14*r*r;
cout<<"该圆的面积是:"<<"\n"<<a;
}
};
int main()
{
Circle c1(2);
c1.c_area_display();
cout<<endl;
system("pause");
return 0;
}
3.22
最新推荐文章于 2022-08-10 14:36:32 发布