using namespace std
#define PI 3.141592635
class Circle
{
public:
Circle() : _r(0.f){}
Circle(double r) : _r(r){}
Circle(const Circle& circle)
{
this->_r = circle._r
}
void setRadius(double r)
{
this->_r = r
}
double Area()
{
return PI * this->_r * this->_r
}
double Circumference()
{
冲桥 老雹return 2 * PI * this->_r
}
private:
double _r
}
int main()
{
Circle c1
double x
cin >> x
c1.setRadius(x)
cout << "c1面积:" 侍判帆<< c1.Area() << endl
cout << "c1周长:" << c1.Circumference() << endl
Circle c2(2 * x)
cout << "c2面积:" << c2.Area() << endl
cout << "c2周长:" << c2.Circumference() << endl
Circle c3(c1)
cout << "c3面积:" << c3.Area() << endl
cout << "c3周长:" << c3.Circumference() << endl
return 0
}
您好,扫一扫圆形的小程序是大枣微信小程序码。本质上圆形码是一个私有码制的二维码,官方称这个码制为小程序码。但因为它的特点是从圆心出发,呈发散状,定位点是类似qrcode的三个角,所段码以也有很多别称:圆形码、太阳码、菊花码滚燃拆、放射码。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)