-->
当前位置:首页 > 题库

PROGRAMMING:Implementation of cube class

Luz5年前 (2021-05-10)题库454
The implementation of the cube class box, complete the calculation of volume, surface area, output results and other functions. The given main function is:
int main( ){
float ab;
cin>>ab;
Box obj;
obj.seta( ab );
obj.getvolume( );
obj.getarea( );
obj.disp( );
return 0;
}
###Input format:
The side length of the cube can be float type data.
###Output format:
The volume and surface area of the cube are separated by a space in the middle and wrapped at the end.
###Input example:
```in
three
```
###Output example:
```out
27 54
```






answer:If there is no answer, please comment