C Program to Check Whether a Number is Positive or Negative

In this example, you will learn to check whether a number (entered by the user) is negative or positive.

C Program to Check Whether a Number is Positive or Negative

 

This program takes a number from the user and checks whether that number is either positive or negative or zero.

Example #1: Check if a Number is Positive or Negative Using if…else

You can also solve this problem using nested if else statement.