QBASIC – Volume of a cuboid

Table of Contents

Program

Below is the QBASIC program to calculate the volume of cuboid.

REM Program to find volume of a cuboid
CLS
INPUT "Enter the length: "; l
INPUT "Enter the breadth: "; b
INPUT "Enter the height: "; h
volume = l * b * h
PRINT "Volume of cuboid is: ";volume
END

Output

Volume of Cuboid QBASIC

Explanation

Let’s first see the formula:  Volume = l * b * h. So, we can determine the volume of a cuboid by taking the length, breadth, and height from the user and multiplying the length, breadth, and height together.

More Programs

https://thinkshare.one/learn/programming/qbasic/

Leave a Comment

Your email address will not be published. Required fields are marked *