+ 1
Input a number and check whether it is positive, negative or zero??
Pls ANSWER IT I NEED THE PROBLEM!!
2 Réponses
0
//I think you can write the basic parts I'll start directly from logic
int a;
cin>>a;
if(a>0)cout<<"positive";
else if(a<0)cout<<"negative";
else cout<<"zero";
0
int n = 0;
cin>>n;
(n <0 ) ? cout<<"negative" : cout<<"positive";