Computer Science, asked by nehal81, 1 month ago

write a program to find the area of parallelogram in qbasic

Answers

Answered by Zidane5929
0

Answer:

CLS

PRINT "CALCULATE AREA OF PARALLELOGRAM"

PRINT

INPUT "Enter the Base: ";base

INPUT "Enter the Height: ";height

area = base * height

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

END

Explanation:

In this program, the user is prompted to enter the base and height of the parallelogram. The area of the parallelogram is then calculated by multiplying the base by the height, and the result is stored in the variable area. The program then prints the area of the parallelogram to the console.

Please note that this is a basic program and it does not include any error handling or validation. If you want to make the program more robust, you should consider adding some validation and error handling code to ensure that the input is valid and to handle any unexpected input.

Similar questions