write a QBasic program to input a number and check if the number is greater or smaller or same as the second number using non operator
please explain it I will mark you brainlist
Answers
Answered by
3
Answer:
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
Read more on Brainly.in - https://brainly.in/question/10118914#readmore
Similar questions