Ask Question
4 January, 12:11

Four int variables, x1, x2, y1, and y2, have been declared and been given values. write an expression whose value is the difference between the larger of x1 and x2 and the smaller of y1 and y2.

+4
Answers (1)
  1. 4 January, 15:54
    0
    Even though we are using variables, we still know that "difference" means subtraction. So, if the larger is x1 and x2, those variables go first. The smaller, y1 and y2 will go second. So our problem will look like this:

    (x1 < x2? x2 : x1) - (y1 < y2? y1 : y2)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Four int variables, x1, x2, y1, and y2, have been declared and been given values. write an expression whose value is the difference between ...” in 📘 Mathematics if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers