DISPLAY GREATEST AMONG 3 NO (SUB)
DECLARE SUB CHECK(A,B,C)
CLS
INPUT "ENTER ANY 3 NO";A,B,C
CALL CHECK (A,B,C)
END
SUB CHECK (A,B,C)
IF A>B AND A>C THEN
PRINT "THE GREATEST NO IS";A
ELSEIF B>A AND B>C THEN
PRINT "THE GREATEST NO IS";B
ELSE
PRINT THE GREATEST NO IS";C
END IF
END SUB
CLS
INPUT "ENTER ANY 3 NO";A,B,C
CALL CHECK (A,B,C)
END
SUB CHECK (A,B,C)
IF A>B AND A>C THEN
PRINT "THE GREATEST NO IS";A
ELSEIF B>A AND B>C THEN
PRINT "THE GREATEST NO IS";B
ELSE
PRINT THE GREATEST NO IS";C
END IF
END SUB
Comments
Post a Comment