Given the code: int x, y; cout << "Enter two integers: "; cin >> x >> y; Write a few lines of code to print "X" if x is greater than y, "Y" if y is greater then x or "XY" if they are equal. This code must always print one of the messages. Example Output Enter two integers: 5 7 Y atom code only
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Given the code:
int x, y;
cout << "Enter two integers: ";
cin >> x >> y;
Write a few lines of code to print "X" if x is greater than y, "Y" if y is greater then x or "XY" if they are equal.
This code must always print one of the messages.
Example Output
Enter two integers: 5 7
Y
atom code only
C++ code to print the greatest of the two user input integer value
Step by step
Solved in 2 steps with 2 images