#include <iostream>
using namespace std;
typedef long int *pint32;
class Box {
public:
double length;
double breadth;
double height;
};
int main() {
Box box1;
Box box2;
double volume = 0.0;
box1.height = 5.0;
box1.length = 6.0;
box1.breadth = 7.0;
box2.height = 10.0;
box2.length = 12.0;
box2.breadth = 13.0;
volume = box1.height * box1.length * box1.breadth;
cout << "box1 体积" << volume << endl;
}
原文地址:https://www.cnblogs.com/niconico-girl/p/9682532.html
时间: 2024-11-09 00:43:09