#include <iostream>
using namespace std;
class RectareaVolume {
public:
int length;
int width;
int height;
int getVolume(){
return width * height * length;
}
};
void text() {
RectareaVolume re;
re.length = 10;
re.width = 20;
re.height = 10;
cout << "長方體體積為:" << re.getVolume() << endl;
}
void main() {
text();
system("pause");
}
uj5u.com熱心網友回復:
有什么問題嗎?

uj5u.com熱心網友回復:
很好,做得很好。轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/25869.html
標籤:基礎類
