Cpp - Write program to calculate volume of three-dimensional rectangle

Requirements

Write program to calculate volume of three-dimensional rectangle

Hard code the value as

width = 5;
length = 10;
height = 7;

Hint

To determine the volume, use the multiplication operator * to multiply all three values of width, length, and height.

Demo

#include <iostream>

int main()/*from ww  w  .  j  av  a 2  s. c o m*/
{
    // create a type definition
    typedef unsigned short USHORT; 

    // set up width, length and height
    USHORT width = 5;
    USHORT length = 10;
    USHORT height = 7;
  
    // create an unsigned short initialized with the
    // result of multiplying width by length by height
    USHORT area = width * length * height;

    std::cout << "Width: " << width << "\n";
    std::cout << "Length: "  << length << "\n";
    std::cout << "Height: "  << height << "\n";
    std::cout << "Area: " << area << "\n";
    return 0;
}

Result