C++课后答案1.docVIP

  • 30
  • 0
  • 约1.02万字
  • 约 12页
  • 2017-08-28 发布于广东
  • 举报
P68页第6题 6: #include iostream using namespace std; class Box {public: void get_value(); float volume(); void display(); public: float lengh; float width; float height; }; void Box::get_value() { coutplease input lengh, width,height:; cinlengh; cinwidth; cinheight; } float Box::volume() { return(lengh*width*height);} void Box::display() { coutvolume()endl;} int main() {Box box1,box2,box3; box1.get_value(); coutvolmue of bax1 is ; box1.display(); box2.get_value(); coutvolmue of bax2 is ; box2.display(); box3.get_value(); coutvolmue of bax3 is ; box3.display(); retur

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档