cylinderdef.cpp
来自「谭浩强 《C++ 程序设计》第三版的部分课后练习题源码」· C++ 代码 · 共 24 行
CPP
24 行
float Cylinder::area()const
{
return 2*Circle::area()+2*3.1415*r*height;
}
float Cylinder::volume()const
{
return Circle::area()*height;
}
void Cylinder::showname()const
{
cout<<"the information of the cylinder: ";
}
void Cylinder::display()const
{
Circle::display();
cout<<"the height="<<height<<endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?