The program code is in qbasic language_____________
______________
Code........................................................below👇👇👇👇
PRINT "************ BASIC CALCULATOR ************"
CLS
PRINT "Basic Calculator"
PRINT "----------------"
PRINT
DO
PRINT "1. Addition"
PRINT "2. Subtraction"
PRINT "3. Multiplication"
PRINT "4. Division"
PRINT "5. Exit"
PRINT
INPUT "Enter your choice (1-5): "; choice$
SELECT CASE choice$
CASE "1"
INPUT "Enter the first number: "; num1
INPUT "Enter the second number: "; num2
result = num1 + num2
PRINT "Result: "; result
CASE "2"
INPUT "Enter the first number: "; num1
INPUT "Enter the second number: "; num2
result = num1 - num2
PRINT "Result: "; result
CASE "3"
INPUT "Enter the first number: "; num1
INPUT "Enter the second number: "; num2
result = num1 * num2
PRINT "Result: "; result
CASE "4"
INPUT "Enter the first number: "; num1
INPUT "Enter the second number: "; num2
IF num2 = 0 THEN
PRINT "Error: Division by zero!"
ELSE
result = num1 / num2
PRINT "Result: "; result
END IF
CASE "5"
PRINT "Exiting..."
END
CASE ELSE
PRINT "Invalid choice! Please enter a number from 1 to 5."
END SELECT
PRINT
LOOP
This program displays a menu of options for performing addition, subtraction, multiplication, and division. It also includes an option to exit the calculator. The user can enter their choice, and then the program prompts for the required numbers to perform the selected operation. The result is then displayed. The program continues to run in a loop until the user chooses to exit.