CLS
DO
INPUT "Enter first value: ", c1
INPUT "Enter operation(+,-,*,/): ", c2$
INPUT "Enter second value: ", c3
LOOP UNTIL INSTR("+-*/", MID$(c2$, 1, 1))
IF c2$ = "+" THEN c4 = c1 + c3
IF c2$ = "/" THEN
IF c3 <> 0 THEN c4 = c1 / c3 ELSE PRINT "division by zero": END
END IF
IF c2$ = "*" THEN c4 = c1 * c3
IF c2$ = "-" THEN c4 = c1 - c3
PRINT c4
Тестирование выполнено в программе QB64 ( Скачать )