Write a QBasic program to input two numbers and print addition , subtraction and multiplication
Answers
Answered by
20
Answer:
CLS
INPUT A
INPUT B
PRINT A+B (TO PRINT SUM)
IF A>B (TO CHECK WHICH NO. IS GREATER)
THEN PRINT A-B (TO PRINT DIFFERENCE)
ELSE
PRINT B-A (TO PRINT DIFFERENCE)
PRINT A*B (TO PRINT PRODUCT)
END
IF THERE ARE ANY ERROR THEN KINDLY CORRECT IT.
I HOPE U WILL FIND THIS PROGRAM HELPFUL
Explanation:
Answered by
11
Question:-
Write a program in QBASIC to input two numbers and print addition,subtraction,multiplication.
Program:-
CLS
INPUT "ENTER A: ";A
INPUT " ENTER B: ";B
PRINT "SUM: "+(A+B)
PRINT "DIFFERENCE: "+(A-B)
PRINT "PRODUCT: "+(A*B)
END
BrainlyProgrammer:
Nice
Similar questions
English,
2 months ago
Science,
2 months ago
Math,
2 months ago
Math,
5 months ago
Political Science,
10 months ago
Political Science,
10 months ago