Answer to Question #340925 in C++ for poms

Question #340925
  1. Input two integers in one line.
  2. Print the two integers in one line, and separate them with a space.
  3. Print a string message "Equal" on a new line, if both inputted integers are equal.
1
Expert's answer
2022-05-14T16:39:05-0400
#include <iostream>

using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	cout << a << " " << b;
	cout << (a == b ? "\nEqual" : "");
	return 0;
}

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
APPROVED BY CLIENTS