48.
Write a program to input any number and check whether the given no. is
positive or negative using sub procedure.
DECLARE SUB CHECK (N)
CLS
INPUT “ENTER ANY NUMBER”;
N
CALL CHECK (N)
END
SUB CHECK (N)
IF N > 0 THEN
PRINT “ POSITIVE NUMBER”
ELSEIF N < 0 THEN
PRINT “ NEGATIVE NUMBER”
END IF
END SUB
No comments:
Post a Comment