Computer Science, asked by yashmallah000, 10 months ago

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

Answers

Answered by guptashweta18128
0

Answer:

A number is positive if it is greater than 0. A number is negetive if it is less than 0. A number is non-negetive if it is greater than or equal to 0. A number is non- positive if it is less than or equal to 0

Answered by muscardinus
0

COMPLETE SOLUTION IS GIVEN BELOW.

Explanation:

Since, you have not mentioned the language I am assuming it to be C++ because it is the most used among students.

Now program starts from here:

#include<iostream.h>

void main()

{

  int a, b ;

 cout<<"ENTER 1 st NUMBER\n";

 cin>>a;    

 cout<<"ENTER 2 nd NUMBER\n;

 cin>>b;

 if( a==b)                        // comparing two numbers entered by user.

  cout<<"Both numbers are equal;

else

 cout<<"Both numbers are unequal;

}

Hence, this is the required solution.

Learn More :

If else

https://brainly.in/question/13968163

Similar questions