WAP to find whether a given number is positive, negative or zero
CLS
INPUT"ENTER ANY NUMBER";A
IF A > 0 THEN
PRINT"THE GIVEN NUMBER IS POSITIVE"
ELSE IF A < 0 THEN
PRINT"THE GIVEN NUMBER IS NEGATIVE"
ELSE
PRINT"THE GIVEN NUMBER IS ZERO"
END IF
END
INPUT"ENTER ANY NUMBER";A
IF A > 0 THEN
PRINT"THE GIVEN NUMBER IS POSITIVE"
ELSE IF A < 0 THEN
PRINT"THE GIVEN NUMBER IS NEGATIVE"
ELSE
PRINT"THE GIVEN NUMBER IS ZERO"
END IF
END
Comments
Post a Comment