write a progarm to find the greater number in q-basic (practical-notes)
Answers
Answer:
results. The goal of our study is to learn how to write computer programs in QBASIC ... Write a program to input 3 numbers then find the maximum one. Solution.
Answer: 91. WAP to enter any two numbers and display the greater one.
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
Explanation: I hope it will help u...plzz..mark me as the Brainliest