Computer Science, asked by Devadharshini30, 8 months ago

Elsa is new to concept of positive and negative numbers. Can you help her to check whether the given number is positive or negative.
Input consist of an integer.

Answers

Answered by abheergoel10
1

Answer:

If you code in python then it is helpful

Explanation:

your_number = 9

if your_number >= 0:

   print("Number is positive")

elif your_number <= 0:

   print("Number is negative")

else:

   print("Number is zero")

Answered by rutikwankhade1
3

Answer:

#include<iostream>

using namespace std;

int main(){

 int a;

 cin>>a;

 if(a>=0)

 {cout<<a<<" is a positive number.";}

 else{cout<<a<< " is a negative number.";}

}

 

Explanation:

Similar questions