write a c++ to define a class box with length,breadth and
height as data member and input value(),printvalue() and
volume() as member functions.
Answer Posted / muhammad waqas
#include<iostream>
using namespace std;
class Box{
public:
int height;
int length;
int width;
};
main()
{
int height;
int length;
int width;
int volume=0;
Box box1;
Box box2;
box1.height=3;
box1.length=2;
box1.width=1;
volume=box1.height*box1.length*box1.width;
cout<<volume;
}
| Is This Answer Correct ? | 91 Yes | 40 No |
Post New Answer View All Answers
Why should a c++ programmer be interested in stl?
Who wrote stl?
Is string part of stl?
How do I convert a stl file?
Explain stl.
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
What is stl language?
what is template and type convertion
What are the components of stl?
What is stl stack?
What is the use of stl?
What is a list in c++ stl?
What is a standard template library (stl)?
How stl is different from the c++ standard library?