Here, I have listed some of the qbasic programs. We also have mobile app where you can view all the qbasic programs. For better experience I highy recommend you to use our mobile app

Please download our app by clicking the image below:

If the above link is not working. You can use this link –> https://play.google.com/store/apps/details?id=com.allbachelor.qbasicapp

## 1. **Write a program ****in qbasic** **to display volume of sphere.**

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY VOLUME OF SPHERE.
CLS
INPUT “ENTER RADIUS ”;R
V = (4 / 3) * 3.14 * R ^ 3
PRINT “VOLUME OF SPHERE ”;V
END
```

**2. Write a program ****in qbasic** **to display area of 4 walls**

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY AREA OF 4 WALLS
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
A = 2 * H * (L + B)
PRINT “AREA OF FOUR WALLS”; A
END
```

**3. Write a program ****in qbasic** **to display total surface area and volume of cuboid.**

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY TOTAL SURFACE AREA AND VOLUME OF CUBOID
CLS
INPUT “ENTER LENGTH OF CUBOID”; L
INPUT “ENTER BREADTH OF CUBOID”; B
INPUT “ENTER HEIGHT OF CUBOID”; H
A= 2 * (L * B + B * H + H * L)
V = L * B * H
PRINT “TOTAL SURFACE AREA OF CUBOID “; A
PRINT “VOLUME OF CUBOID ”; V
END
```

**4. Write a program ****in qbasic** **to display the total surface area of the cube.**

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY TOTAL SURFACE AREA OF CUBE
CLS
INPUT “ENTER SIDE OF A CUBE”; L
T= 6 * L ^ 2
PRINT “TOTAL SURFACE AREA OF CUBE“; T
END
```

**5. Write a program ****in qbasic** **to display area of rectangle**

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY AREA OF RECTANGLE
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
A = L * B
PRINT “AREA OF RECTANGLE ”; A
END
```

**6. Write a program ****in qbasic** **to display the circumference of a circle. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY CIRCUMFERENCE OF CIRCLE
CLS
INPUT “ENTER RADIUS”; R
C = 2 * 3.14 * R
PRINT “CIRCUMFERENCE OF CIRCLE ”; A
END
```

**7. Write a program ****in qbasic** **to display area of triangle when three sides are given. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY AREA OF TRIANGLE WHEN THREE SIDES ARE GIVEN
CLS
INPUT “ENTER VALUE FOR FIRST SIDE ”; A
INPUT “ENTER VALUE FOR SECOND SIDE ”; B
INPUT “ENTER VALUE FOR THIRD SIDE ”; C
S = (A + B + C) / 2
AR = (S * (S – A) * (S – B) * (S – C)) ^ (1 / 2)
PRINT “AREA OF TRIANGLE “; AR
END
```

**8. Write a program ****in qbasic** **to display area and circumference of circle. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY AREA AND CIRCUMFERENCE OF CIRCLE.
CLS
INPUT “ENTER RADIUS ”; R
A= 3.14 * R ^ 2
C = 2 * 3.14 * R
PRINT “AREA OF CIRCLE “; A
PRINT “CIRCUMFERENCE OF CIRCLE ”; C
END
```

**9. Write a program ****in qbasic** **to ask distance in kilometer and convert into miles. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO CONVERT KILOMETER TO MILES
CLS
INPUT”ENTER DISTANCE IN KILOMETER”; K
M = K * 0.62
PRINT “DISTANCE IN MILES=”; M
END
```

**10 Write a program ****in qbasic** **to input distance in meter and convert into kilometer. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO CONVERT METER TO KILOMETER
CLS
INPUT "ENTER DISTANCE IN METER"; M
K = M \\1000
PRINT K; "KILOMETER";
END
```

**11 Write a program ****in qbasic** to calculate potential energy of body. [PE=MGH where G=9.8]

**in qbasic**to calculate potential energy of body. [PE=MGH where G=9.8]

**Solution:**

```
REM CALCULATE POTENTIAL ENERGY OF BODY
CLS
INPUT “ ENTER MASS”; M
INPUT “ENTER HEIGHT”; H
P = M * 9.8 * H
PRINT “POTENTIAL ENERGY OF BODY”; P
END
```

**12 Write a program ****in qbasic** to display perimeter of rectangle.

**in qbasic**to display perimeter of rectangle.

**Solution:**

```
REM PROGRAM TO DISPLAY PERIMETER OF RECTANGLE
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
P = 2 * (L + B)
PRINT “PERIMETER OF RECTANGLE ”; P
END
```

**13 Write a program ****in qbasic** **to input principal , rate,time and display simple interest and total amount. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY SIMPLE INTEREST AND TOTAL AMOUNT
CLS
INPUT “ENTER PRINCIPAL”; P
INPUT “ENTER TIME”; T
INPUT “ENTER RATE”;R
I = P* T * R / 100
A = P + I
PRINT “SIMPLE INTEREST=”;I
PRINT “TOTAL AMOUNT=”; A
END
```

**14 Write a program ****in qbasic** **to ask in kilogram and convert into grams. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO CONVERT VALUE IN KILOGRAM TO GRAMS
CLS
INPUT”ENTER VALUE IN KILOGRAM”; K
G = K * 1000
PRINT “VALUE IN GRAMS=”; G
END
```

**15. Write a program ****in qbasic** **to display total surface area and volume of sphere. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY TOTAL SURFACE AREA AND VOLUME OF SPHERE.
CLS
INPUT “ENTER RADIUS ”; R
A= 4 * 3.14 * R ^ 2
V = (4 / 3) * 3.14 * R ^ 3
PRINT “TOTAL SURFACE AREA OF SPHERE “; A
PRINT “VOLUME OF SPHERE ”; V
END
```

**16 Write a program ****in qbasic** **to display total surface area of cylinder. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY TOTAL SURFACE AREA OF CYLINDER
CLS
INPUT “ENTER RADIUS ”; R
INPUT “ENTER HEIGHT”; H
A= 2 * 3.14 * R * (R + H)
PRINT “TOTAL SURFACE AREA OF CYLINDER “; A
END
```

**17 Write a program ****in qbasic** **to display total surface area of cuboid / box. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY TOTAL SURFACE AREA OF CUBOID / BOX
CLS
INPUT “ENTER LENGTH”;L
INPUT “ENTER BREADTH”;B
INPUT “ENTER HEIGHT”;H
T= 2 * (L * B + B * H + H * L)
PRINT “TOTAL SURFACE AREA OF CUBOID“;T
END
```

**18 Write a program ****in qbasic** **to display area and perimeter of rectangle. **

**in qbasic**

**Solution:**

```
REM PROGRAM TO DISPLAY AREA AND PERIMETER OF RECTANGLE
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
A= L * B
P = 2 * (L + B)
PRINT “AREA OF RECTANGLE “; A
PRINT “PERIMETER OF RECTANGLE ”; P
END
```

**19 Write a program in qbasic to display total surface area of sphere. **

**Solution:**

```
REM PROGRAM TO DISPLAY TOTAL SURFACE AREA OF SPHERE.
CLS
INPUT “ENTER RADIUS ”; R
A= 4 * 3.14 * R ^ 2
PRINT “TOTAL SURFACE AREA OF SPHERE “; A
END
```

**20 Write a program in qbasic to calculate distance.[S=UT+1/2(AT2)] **

**Solution:**

```
REM CALCULATE DISTANCE
CLS
INPUT “ENTER INITIAL VELOCITY”; U
INPUT “ENTER TIME”; T
INPUT “ENTER ACCELARATION”; A
S = U * T + 1 / 2 * A * T ^ 2
PRINT “DISTANCE TRAVELLED = “; S
END
```

You can view other Qbasic programs in 2nd part of this post

Please download our app by clicking the image below:

If the above link is not working. You can use this link –> https://play.google.com/store/apps/details?id=com.allbachelor.qbasicapp

It is actually a nice and helpful piece of information.

I’m glad that you

simply shared this useful info with us.

Please keep us up to date like this.

Thanks for sharing.

I go to see day-to-day a few web sites and blogs to read articles,

except this web

site gives feature based

writing.

wonderful as well as amazing blog site. I really want to thank

you, for giving us much better info.