2.6
来源:互联网 发布:java 没有初始化string 编辑:程序博客网 时间:2024/04/29 21:29
#include<iostream>
using namespace std;
class M{
private:
int len;
int wid;
int hei;
public:
void c();
void v();
};
void M::c(){
cout<<"请输入长方形的长,宽,高\n";
cin>>len>>wid>>hei;
}
void M::v(){
cout<<"长方形的体积是"<<len*wid*hei<<endl;
}
M s1,s2,s3;
int main()
{
s1.c();
s2.c();
s3.c();
s1.v();
s2.v();
s3.v();
return 0;
}
using namespace std;
class M{
private:
int len;
int wid;
int hei;
public:
void c();
void v();
};
void M::c(){
cout<<"请输入长方形的长,宽,高\n";
cin>>len>>wid>>hei;
}
void M::v(){
cout<<"长方形的体积是"<<len*wid*hei<<endl;
}
M s1,s2,s3;
int main()
{
s1.c();
s2.c();
s3.c();
s1.v();
s2.v();
s3.v();
return 0;
}
0 0
- 2.6
- 2.6
- 2.6
- 2.6
- 2.6
- 2.6
- 2.6
- TimerLock 2.6
- 2.6 小结
- 2.6 查询
- 2.6数组
- hdu1.2.6
- nop 2.6
- 练习2.6
- CareerCup 2.6
- 2.6 scopy
- Exercise 2.6
- 【例 2.6】
- Kinect结合Unity开发(一)
- C++第十九题20150412
- php+jquery+ajax+json
- 2012年"浪潮杯"山东省第三届ACM大学生程序设计竞赛 The Best Seat in ACM Contest 看清题目后,我是真哭了。。。。。
- 进程与线程
- 2.6
- 剑指offer--把数组排成最小的数
- R语言基础编程技巧汇编 - 24
- 表达式的值
- Qemu中coroutine机制的实现
- mysql函数大全
- Python特殊语法:filter、map、reduce、lambda [转]
- rman对oralce数据进行全备份
- LeetCode Partition List