Monday, August 2, 2021

C++ Program to find input number is positive or negative.

C++ Program to find input number is positive or negative.

#include<iostream.h>

#include<conio.h>

void main()

{

int n;

 clrscr();

 cout<<"\nEnter any number ";

 cin>>n;

 if(n>0)

  {

   cout<<"\n Its Positive Number";

  }

  else

  {

   cout<<"\n Its Negative Number";

  }

 getch();

}

No comments:

Post a Comment

Programmingway@Eklavya Technosys!: Class - 7 A or B | Computer | 100 Questions!

Programmingway@Eklavya Technosys!: Class - 7 A or B | Computer | 100 Questions! :  1) What is digital citizenship? 2) What is a digital citi...