Table of Contents
Program
Below is the QBASIC program to calculate the total surface area of a cube.
REM Program to find total surface area of a cube
CLS
INPUT "Enter the length: "; l
area = 6 * l ^ 2
PRINT "Total Surface Area of cube is: ";area
END
Output
![Total Surface Area of cube QBASIC](https://thinkshare.one/wp-content/uploads/2021/08/Total-Surface-Area-of-cube-QBASIC.png)
Explanation
Let’s first see the formula: Area = 6 * l ^ 2. So, we can determine the total surface area of a cube by taking the length from the user and multiplying the length raised to the power of 2 by 6.
Note: All sides are equal in a cube, hence only ask the length of a cube from the user.
More Programs
https://thinkshare.one/learn/programming/qbasic/