Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

3330


Is stl open source?

1092


What are the symptoms of stl?

1066


What is meant by stl in c++?

1098


Is stl part of c++ standard?

1044


What is stl stack?

1077


What is a stl vector?

1170


What is stl language?

1097


how can u do connectivity in c++ language? plz send me connectivity code in c++ ?

2283


How stl is different from the c++ standard library?

1157


What are stl algorithms?

1124


what is template and type convertion

2423


What is a list in c++ stl?

1129


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

2189


What two types of containers does the stl provide?

951