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 ? | 88 Yes | 40 No |
Post New Answer View All Answers
how to use C++?
Who wrote stl?
Is stl open source?
What does stl mean in slang?
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
What are stl algorithms?
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
What is meant by stl in c++?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
Name the different types of stl containers.
Is string part of stl?
What is stl stack?
How stl is different from the c++ standard library?
What does stl stand for in basketball?