个人作业

来源:互联网 发布:程序员面试宝典 微盘 编辑:程序博客网 时间:2024/06/01 09:08

#include<iostream>

using namespace std;

class Cfz

{

public:

void shulu();

void tiji();

private:

int length;

int width;

int heigth;

};

void Cfz::shulu()

{

cin>>length;

cin>>width;

cin>>heigth;

}

void Cfz::tiji()

{

int max;

max=length*width*heigth;

cout<<"max="<<max;

}

int main()

{

Cfz f;

f.shulu();

f.tiji ();

return 0;

}

0 0