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
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
Is stl open source?
What are the symptoms of stl?
What is meant by stl in c++?
Is stl part of c++ standard?
What is stl stack?
What is a stl vector?
What is stl language?
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
How stl is different from the c++ standard library?
What are stl algorithms?
what is template and type convertion
What is a list in c++ stl?
To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command
What two types of containers does the stl provide?