Table of Contents
Program
Below is the QBASIC program to calculate the total surface area of a cuboid.
REM Program to find total surface area of a cuboid
CLS
INPUT "Enter the length: "; l
INPUT "Enter the breadth: "; b
INPUT "Enter the height: "; h
area = 2 * (l * b + b * h + l * h)
PRINT "Total Surface Area of cuboid is: ";area
END
Output
Explanation
Let’s first see the formula: Area = 2 * (l * b + b * h + l * h) . So, we can determine the total surface area of any cuboid by taking the length, breadth, and height from the user and multiplying the sum of the product of length and breadth, breadth and height, and length and height by 2.
More Programs
https://thinkshare.one/learn/programming/qbasic/