2015年第二周项目二:长方柱类
来源:互联网 发布:linux重启网络服务失败 编辑:程序博客网 时间:2024/06/05 21:45
#include <iostream>using namespace std;class Bulk{private: double length; double width; double heigth; double volume; double area;public: double setxyz() { cin>>length; cin>>width; cin>>heigth; get_areas(); get_volume(); } void get_volume() { volume=length*width*heigth; } void get_areas() { area=2*(length*width+length*heigth+width*heigth); } void display() { cout<<"the volume is:"<<volume<<'\t'; cout<<"the area is:"<<area; }};int main(){ Bulk b1,b2,b3; b1.setxyz(); b2.setxyz(); b3.setxyz(); cout<<"b1:"; b1.display(); cout<<endl; cout<<"b2:"; b2.display(); cout<<endl; cout<<"b3:"; b3.display(); return 0;}
0 0
- 2015年第二周项目二:长方柱类
- 第二周项目二 长方柱类
- 第二周项目二:长方柱类
- 第二周项目二--长方柱类
- 第二周 项目二-长方柱类
- 第二周项目二长方柱类
- 第二周 项目二--长方柱类
- 第二周项目二长方柱类
- 第二周项目二 长方柱类
- 第二周项目二 长方柱类
- 第二周 项目二 长方柱类
- 第二周 项目二 长方柱类
- 15第二周项目二——长方柱类
- 第二周项目二——长方柱类
- 第二周项目2-长方柱类
- 第二周 项目2-长方柱类
- 第二周【项目2-长方柱类】
- 第二周项目:长方柱类
- STL
- Uiautomator Api浅析
- 安卓系统下的多线程断点下载实现
- CentOS Linux下配置Oracle 11gR2为系统服务自动启动
- android CTS命令
- 2015年第二周项目二:长方柱类
- POJ3009 Curling 2.0
- ubuntu14.04 ssh 和 图形界面root登入
- 在 Linux 如何更改文本文件的字符编码
- csdn编程练习之高斯公式
- 数据库三范式
- java数组
- 夏俊:深入网站服务端技术(一)——网站并发的问题
- 信息推荐系统学习笔记之概述