Write a program in QBASIC to calculate the area of a circle taking pie as 3.142

To calculate the area of a circle in QBASIC, you can use the formula: `Area = π × radius²`, where π is an approximation of the mathematical constant π (pi), and `radius` is the distance from the center of the circle to its edge.

Here's an example program in QBASIC that calculates the area of a circle using the given approximation of π (3.142):

```
CLS

PI = 3.142

INPUT "Enter the radius of the circle: ", radius
area = PI * radius * radius

PRINT "The area of the circle is: "; area

END
```

When you run this program, it will prompt you to enter the radius of the circle. After entering the radius, it will calculate the area using the formula, and then display the result.

Note: In QBASIC, the `CLS` command clears the screen, and the `PRINT` statement is used to display output on the screen. The `INPUT` statement is used to accept user input and store it in a variable.