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
Social Sciences,
3 months ago
English,
3 months ago
Science,
3 months ago
Math,
7 months ago
Political Science,
11 months ago
Political Science,
11 months ago