How to find Number is a positive or Negative in C:-
- The following concept will test whether a number is positive or negative. It is done by checking where the number lies on the number line. The following algorithm will help to check this condition.
- If the input number is greater than zero then it is a positive number.
- If the input number is less than zero it is a negative number.
- If the number is zero then it is neither positive nor negative.
- Same logic we have followed in the below C program.



Comments
Post a Comment