Positive, negative or zero 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"THE GIVEN NO IS POSITIVE"
ELSEIF N<0 THEN
PRINT"THE GIVEN NO IS NEGATIVE"
ELSE
PRINT"THE GIVEN NO IS ZERO"
END IF
ENS SUB
DECLARE SUB CHECK(N)
CLS
INPUT"ENTER ANY 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
ENS SUB
Comments
Post a Comment