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
how to use C++?
Who wrote stl?
sir please send me bpcl previous question papers
Who created stl?
please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html
What are the symptoms of stl?
What do stl stand for?
What is stl stand for?
When did c++ add 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
write a program to convert a decimal number in to its equivalent binary number?
What is the stl, standard template library?
What are stl algorithms?
What is a stl vector?
Explain stl.