当前位置:   article > 正文

python计算长方体体积最简单代码_求圆柱体积和长方体体积C++源代码

输入长方体的边长a,b,c,求其体积。 python

#include &ltiostream&gt

#define PI 3.1415926

using namespace std;

class Rectangle

{

protected:

float x, y, Length, Width;

public:

float Area()

{

return Length*Width;

}

Rectangle(float i, float j, float L, float W)

{

x = i;

y = j;

Length=L;

Width=W;

}

};

class Circle

{

protected:

float X, Y, R;

public:

float cc;

float Area()

{

return(R*R*PI);

}

Circle(float i, float j, float k)

{

X = i;

Y = j;

R = k;

}

};

class Cuboid :public Circle, public Rectangle

{

protected:

float High;

float VR, VC;

pu

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/833672
推荐阅读
相关标签
  

闽ICP备14008679号