QBASIC PRPGRAM TO FIND GREATEST AMONG 3 NUMBERS USING SUB.

DECLARE SUB GREAT(A,B,C)
CLS
INPUT"ENTER FIRST NUMBER";A
INPUT"ENTER SECOND NUMBER";B
INPUT"ENTER THIRD NUMBER";C
CALL GREAT(A,B,C)
END

SUB GREAT (A,B,C)
IF A>B AND A>C THEN
PRINT"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

Popular posts from this blog

MY JOURNEY OF 11 YEARS WITH JM

Teej