write a c++ program to find whether a number is positive or negative.

Source code-
#include<iostream>
using namespace std;
int main(){
int number;
cout<<“Enter a number “;
cin>>number;
if(number>0)
cout<<“Negative”;
else
cout<<“Positive”;
}
OUTPUT-
Enter a number 5
Negative

Leave a Comment

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

To Resolve this issue at just 5$ from ServerExpert

https://serverexpert.io/

For Hosting please visit Hostingwebsite.io

You have Successfully Subscribed!

Open chat