Table of Contents
Program
Below is the QBASIC program to calculate the volume of a hemisphere.
REM Program to find volume of hemisphere
CLS
INPUT "Enter the radius: "; r
volumen = 2/3 * 3.14 * r ^ 3
PRINT "Volume of a hemisphere is: ";volume
END
Output
![volume of a hemisphere QBASIC](https://thinkshare.one/wp-content/uploads/2021/08/volume-of-a-hemisphere-QBASIC.png)
Explanation
Let’s first see the formula: volume = 2/3 * pi * r ^ 3, where the value of pi is 3.14. So, we can determine the volume of any hemisphere by taking the radius of the circle from the user and multiplying the value of pi by 2/3, and the radius of the circle raised to the power of 3.
More Programs
https://thinkshare.one/learn/programming/qbasic/