Wednesday, October 2, 2019

26) CHECK POSITIVE OR NEGATIVE (SUB)

DECLARE SUB CHECK(N)
CLS
INPUT " ENTER THE NUMBER";N
CALL CHECK(N)
END

SUB CHECK(N)
IF N > 0 THEN
PRINT "THE GIVEN NO IS POSITIVE"
ELSEIF N < 0 THEN
PRINT "THE GIVEN NO IS NEGATIVE"
ELSE
PRINT "THE GIVEN NO. IS ZERO "
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...