Write a C program to check positive, negative or zero using simple if or if else. C program to input any number from user and check whether the given number is positive, negative or zero. Logic to check negative, positive or zero in C programming.
Example
Input
Input number: 23
Output
23 is positive
Answers
Answered by
4
Write a C program to check positive, negative or zero using simple if or if else.
...
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.
hope it helps you mate
Similar questions