write a c++ program to check whether a number is negative positive or zero
Answers
Answered by
0
Answer:
#include <iostream>
using namespace std;
int main(){
int a;
cout<<"enter the number";
cin>>a;
if(a>0)
{
cout<<"positive";
}
else if(a<0)
{
cout<<"negative";
}
else{
cout<<"zero";
}
return 0;
}
Output
enter the number 6
positive
Similar questions