Positive or Negative

Program to Find whether the inserted number is Positive or Negative





#include<iostream.h>

#include<conio.h>

int main()

{

int a;

cout<<"Enter the  number: ";

cin>>a;


if (a>0)

cout<<"It is Positive number. ";

else if (a==0)
 
cout<<"It is neither positive  nor negative number. ";

else
 
cout<<"It is Negative number. ";

getch();

return 0;

}






No comments :

Post a Comment