Write a program in QBASIC to input 3 numbers and print their product.
Answers
Answered by
1
Answer:
Explanation:
REM PROGRAM TO DISPLAY SUM OF TWO NUMBERS
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
S = A + B
PRINT “SUM OF TWO NUMBERS”; S
END
USING SUB PROCEDURE
DECLARE SUB SUM (A, B)
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
CALL SUM(A, B)
END
SUB SUM (A, B)
S = A + B
PRINT “SUM OF TWO NUMBERS”; S
END SUB
USING FUNCTION PROCEDURE
DECLARE FUNCTION SUM (A, B)
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
S = SUM(A, B)
PRINT “SUM OF TWO NUMBERS”; S
END
FUNCTION SUM (A, B)
SU = A + B
SUM = SU
END FUNCTION
Similar questions
Biology,
6 days ago
Political Science,
6 days ago
Social Sciences,
6 days ago
History,
12 days ago
English,
12 days ago
Math,
8 months ago
English,
8 months ago