76.8k views
16 votes
Write a c++pogram to accept two integers and check whether they are equal or not​

User Lupguo
by
3.4k points

1 Answer

6 votes

Program to accept two integers and check whether they are equal or not​.

#include<iostream.h>

void main( )

using namespace std;

int main( )

{

int num1, num2;

cout<< " Input the values for number1 and number2: " ;

cin>> num1 >> num2;

if (num1 == num2)

{

cout<< " Both numbers are equal";

}

else

{

cout<< " numbers are not equal" ;

}

}

User Sietse
by
3.5k points