3.23
来源:互联网 发布:朗诵配乐知乎 编辑:程序博客网 时间:2024/06/10 01:47
#include<iostream>
#include<string>
using namespace std;
const double PI=3.14;
class cyclinder
{public:
double vol()
{cout<<"圆柱体的体积为:"<<are()<<endl;
};
double are()
{return PI*radium*radium*high;}
cyclinder(double r,double h)
{high=h;
radium=r;
}
private:
double high;
double radium;
};
int main()
{cyclinder cyc1(2.5,3);
cyc1.are();
cyc1.vol();
cyclinder cyc2(3,4);
cyc2.are();
cyc2.vol();
return 0;
}
#include<string>
using namespace std;
const double PI=3.14;
class cyclinder
{public:
double vol()
{cout<<"圆柱体的体积为:"<<are()<<endl;
};
double are()
{return PI*radium*radium*high;}
cyclinder(double r,double h)
{high=h;
radium=r;
}
private:
double high;
double radium;
};
int main()
{cyclinder cyc1(2.5,3);
cyc1.are();
cyc1.vol();
cyclinder cyc2(3,4);
cyc2.are();
cyc2.vol();
return 0;
}
0 0
- 3.23
- 3.23
- 【3.23】
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 3.23
- 如何取消IE“已限制此网页运行可以访问计算机的脚本或ActiveX控件”
- vs的插件开发- VS开发设置VC项目调试命令
- Smali语法:Registers(寄存器)
- 【Rails学习笔记】用户模型
- win7 将tomcat添加到系统服务
- 3.23
- 【Rails学习笔记】页面布局
- 微信二维码扫描下载APK
- Firefox中的event is undefined
- IOS 学习八 代码创建UIButton
- C语言指针学习一
- cp和scp
- 【Rails】有关TDD测试入门
- python正则表达式的简单使用