Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. class Box {
  2.    public:
  3.       double length;   // Length of a box
  4.       double breadth;  // Breadth of a box
  5.       double height;   // Height of a box
  6. };
  7.  
  8. int main( ) {
  9.    Box Box1;        // Declare Box1 of type Box
  10.    Box Box2;        // Declare Box2 of type Box
  11.    double volume = 0.0;     // Store the volume of a box here
  12.  
  13.    // box 1 specification
  14.    Box1.height = 5.0;
  15.    Box1.length = 6.0;
  16.    Box1.breadth = 7.0;
  17.  
  18.    // box 2 specification
  19.    Box2.height = 10.0;
  20.    Box2.length = 12.0;
  21.    Box2.breadth = 13.0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement