Computer Science, asked by aaravkaushik10, 3 months ago

Write the program to input any two numbers and print their sum and product in qbasic

Answers

Answered by SamidhaBartakke
3

Answer:

DECLARE FUNCTION SUM (A, B)

DECLARE FUNCTION PROD (A, B)

CLS

INPUT "ENTER FIRST NUMBER"; A

INPUT "ENTER SECOND NUMBER"; B

PRINT "SUM OF TWO NUMBERS"; SUM (A, B)

PRINT " PRODUCT OF TWO NUMBERS"; PROD (A, B)

END

FUNCTION SUM (A, B)

SUM = A + B

END FUNCTION

FUNCTION PROD (A, B)

PROD = A * B

END FUNCTION

Similar questions