WRITE A QBASIC PROGRAM TO CHECK IF A NUMBER IS POSITIVE OR NEGATIVE(SUB)

QBASIC PROGRAM TO CHECK IF A NUMBER IS POSITIVE OR NEGATIVE


QBASIC PROGRAM TO CHECK IF A NUMBER IS POSITIVE OR NEGATIVE(SUB)

Solution: 


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"
ELSE
PRINT "THE GIVEN NO IS NEGATIVE"
END IF
END SUB