Wednesday, October 2, 2019

17) DISPLAY GREATEST AMONG THREE NUMBERS. (SUB)

DECLARE SUB GREATEST (A, B, C)
CLS
INPUT" ENTER ANY THREE NUMBERS"; A, B, C
CALL GREATEST (A, B, C)
END

SUB GREATEST (A, B, C)
IF A> B AND A> C THEN
PRINT"THE GREATEST NUMBER IS"; A
ELSEIF B>A AND B> C THEN
PRINT"THE GREATEST NUMBER IS"; B
ELSE
PRINT"THE GREATEST NUMBER IS";C
END IF
END SUB

No comments:

Post a Comment

My Journey with JM

MY JOURNEY WITH JAGAT MANDIR It has been almost 10 years since I have entered this school. It seems like just yesterday but now I...