Answer to Question #278509 in C++ for Neneng

Question #278509

Write a C++ program that prompts the user to input two integers and check whether they are equal or not.


1
Expert's answer
2021-12-11T05:52:20-0500
#include<iostream>
using namespace std;

int main()
{
	int x, y;
	cout << "Please, enter a value x: ";
	cin >> x;
	cout << "Please, enter a value y: ";
	cin >> y;
	if (x == y)
	{
		cout << "Values of x and y are equal!";
	}
	else
	{
		cout << "Values of x and y are not equal!";
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog