C++ Program to check if Number is Positive or Negative

In this programming tutorial we will see the Positive or Negative Number check Program in C++ which will take an input number from the user and will check if the number is positive or negative. If it is positive it will print message saying the entered number is positive otherwise it will print negative. In this program we will be using the if-else control statements.

Positive or Negative Number check Program in C++
Output
Enter an integer: -5
You entered a negative integer: -5

Leave a Reply

Your email address will not be published. Required fields are marked *