Ask Question
27 June, 12:23

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.

+1
Answers (1)
  1. 27 June, 12:38
    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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers