📄 zz_4.cpp
字号:
#include <iostream.h>
class tiji
{
public:
void set_value();
void show_value();
private:
int length;
int width;
int high;
int v;
};
void tiji::set_value()
{
cout<<"input length,width,high:"<<endl;
cin>>length>>width>>high;
}
void tiji::show_value()
{
v=length*width*high;
cout<<"体积为:"<<v<<endl;
}
int main()
{
tiji t1;
t1.set_value();
t1.show_value();
tiji t2;
t2.set_value();
t2.show_value();
tiji t3;
t3.set_value();
t3.show_value();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -