Write QBasic Programs for the following problem
statement -
5. WAP to enter two numbers and find the greater
number.
Answers
Answered by
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
English,
2 months ago
Math,
2 months ago
Science,
2 months ago
English,
5 months ago
India Languages,
5 months ago