单项选择题

有如下程序:
#include<iostream>
using namespace std;
class Rect{
int x, y;
public:
Rect(int x1=0, int y1=0):x(x1), y(y1) {}
int get() {return x*y;}
};
class Cube{
Rect plane;
int high;
public:
Cube(int cx, int cy, int ch):plane(cx, cy), high(ch){}
int get(){return plane.get()*high;}
};
int main(){
Cube e(3, 4, 5);
cout<<c.get()<<endl;
return 0;
}
运行时的输出结果是______。

A.12
B.35
C.60
D.80
题目列表

你可能感兴趣的试题

微信扫码免费搜题