Computer Science, asked by ranveerkumar299, 5 months ago

Write QBasic Programs for the following problem

statement -

5. WAP to enter two numbers and find the greater

number.​

Answers

Answered by lalipapa123
1

REM

CLS

INPUT “ENTER ANY TWO NUMBERS”; A, B

IF A > B THEN

PRINT A; “IS GREATER”

ELSE

PRINT B; “IS GREATER”

END IF

END

USING SUB PROCEDURE

DECLARE SUB GREAT (A, B)

CLS

INPUT “ENTER ANY TWO NUMBERS”; A, B

CALL GREAT (A, B)

END

SUB GREAT (A, B)

IF A > B THEN

PRINT A; “IS GREATER”

ELSE

PRINT B; “IS GREATER”

END IF

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION GREAT (A, B)

INPUT “ENTER ANY TWO NUMBERS”; A, B

PRINT “THE GREATER NUMBER IS”; GREAT (A, B)

END

FUNCTION GREAT (A, B)

IF A > B THEN

GREAT = A

ELSE

GREAT = B

END IF

END FUNCTION

IF IT HELPS MARK AS BRAINLIEST♠️

Similar questions