Write an algorithm to find the given number is negative or positive
Answers
Answered by
1
Explanation:
Program to find whether a number is positive or negative
Program to find whether a number is positive or negative is discussed here. Given a number as input, find whether the number is positive or negative.
DESCRIPTION
If the number is greater than 0, print "Positive".
If the number is less than zero, print "Negative".
Input & Output format:
Input consist of 1 integer.
Sample Input and Output 1:
56
Positive
Sample Input and Output 2:
-56
NegativeAlgorithm to find whether a number is positive or negative
Input the number.
If(num > 0)
Print "Positive"
Else
Print "Negative"
Similar questions