Computer Science, asked by lostlegendgaming01, 3 months ago

write a program in c++ to enter the length,breath and hight of a cuboid and calculate its volume.​

Answers

Answered by anindyaadhikari13
3

Answer:

This is the required program for the question in C++.

#include <iostream>

using namespace std;

int main()  {

   float l,b,h,v;

   cout << "Enter length: ";

   cin >> l;

   cout << "Enter breadth: ";

   cin >> b;

   cout << "Enter height: ";

   cin >> h;

   v=l*b*h;

   cout << "Volume is "<< v << " cubic units.";

   return 0;

}

Algorithm:

  1. Accepting the length, breadth and height of the cuboid.
  2. Calculate the volume using formula.
  3. Display the volume.

See the attachment for output.

Attachments:
Similar questions