Qbasic program to find greater number among two numbers
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
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
0 Comments