Computer Science, asked by bhorvaishnavi2004, 1 year ago

to accept two positive or negative numbers and check whether they are equal or not​

Answers

Answered by Anonymous
4

Answer:

A number is positive if it is greater than zero. A number is negative if it is less than zero. A number is non-negative if it is greater than or equal to zero. A number is non-positive if it is less than or equal to zero.

Answered by tiger009
0

Program that accept two positive or negative numbers and check whether they are equal or not​

Output:

Enter 1st positive or negative number: 5

Enter 2nd positive or negative number: 5

They are equal

Explanation:

In the following question, there are some information is missing, the missing information is here we write a program of the given question.

Following are the program in the Python Programming Language.

#get 1st input from the user

a=int(input("Enter 1st positive or negative number: "))

#get 2nd input from the user

b=int(input("Enter 2nd positive or negative number: "))

#checking the variable a is equal to the variable b

if(a==b):

 #print message

 print("They are equal")

#otherwise

else:

 #print message

 print("They are not equal")

Following are the description of the program.

  • Set two variables "a" and "b" which get integer data type input from the user.
  • Then, set the if conditional statement that checks the variable "a" is equal to the variable "b" then, print the message "They are equal".
  • Otherwise, it print "They are not equal".

Learn More:

What are negative numbers?  https://brainly.in/question/3274069

Similar questions