Saturday, 19 July 2014

C plusplus Program to Check if a given Integer is Positive or Negative

Leave a Comment
#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
    int number;
    cout<<"C plusplus Program to Check if a given Integer is Positive or Negative \n\n";
    cout<<"Enter An integer ";
    cin>>number;
    if(number<0)
        {
            cout<<"its negtive number ";
        }
    else if (number>0)
        {
            cout<<"Its positive number ";
        }
    else
        cout<<"its Zero";
    getch();
}
If You Enjoyed This, Take 5 Seconds To Share It