Create a user-defined function to input a number from user and check whether the entered number is positive or negative.
Answers
Answered by
0
Answer:
Logic to check positive, negative or zero
Input a number from user in some variable say num .
Check if(num < 0) , then number is negative.
Check if(num > 0) , then number is positive.
Check if(num == 0) , then number is zero.
Similar questions