QBASIC PROGRAM TO CHECK WHETHER A NUMBER IS POSITIVE OR NEGATIVE
CLS
INPUT “ENTER ANY NUMBER”; N
IF N > 0 THEN
PRINT N; IS POSITIVE NUMBER”
ELSEIF N < 0 THEN
PRINT N; IS NEGATIVE NUMBER”
END IF
END
USING SUB
DECLARE SUB PN()
CLS
INPUT “ENTER ANY NUMBER”; N
IF N > 0 THEN
PRINT N; IS POSITIVE NUMBER”
ELSEIF N < 0 THEN
PRINT N; IS NEGATIVE NUMBER”
END IF
END SUB
0 Comments