Computer Science, asked by reenakumaririya, 7 months ago

Write a QBasic program to input two numbers and print addition , subtraction and multiplication

Answers

Answered by BrainlyProgrammer
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 anindyaadhikari13
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