Question: Answer in C++ Given numeric variables x, y, and z (initialized elsewhere in the program), create an if/else if/else sequence to produce the desired results.
Answer in C++
Given numeric variables x, y, and z (initialized elsewhere in the program), create an if/else if/else sequence to produce the desired results. ? If x is less than or equal to y, and y is less than or equal to z, print out "Ascending Order". ? If x is greater than or equal to y, and y is greater than or equal to z, print out "Descending Order". ? If x, y, and z are all equal, print out "All three numbers are equal" ? If x, y, and z are not ordered - print out "These number are not ordered!" Note, your sequence should print out only one? message about the entered numbers! For example, if the user enters 2, 2, 2, then your program should say: "All three numbers are equal". If the user enters 2, 2, 4, then you program should say: "Ascending Order", and if the user enters 4, 2, 2, the program should say: "Descending Order". #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
