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 answer
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 the larger of x1 and x2 and the smaller of y1 and y2.

Answers

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)

Similar Solved Questions

1 answer

PLEASE HELP 10 POINTS8. What will the exponent be when you simplify the following problem (make sure you type just the value of the exponent only. Do not skip any spaces)SEE PICTURE

PLEASE HELP 10 POINTS8. What will the exponent be when you simplify the following problem (make sure you type just the value of the exponent only. Do not skip any spaces)SEE PICTURE...
1 answer

Which was the first in a series of battles that would lead to the defeat of the German Army? A. Battle of the Saint-Mihiel B. Battle of the Argonne Forest C. Battle of the Marne D. Battle of Verdun

Which was the first in a series of battles that would lead to the defeat of the German Army? A. Battle of the Saint-Mihiel B. Battle of the Argonne Forest C. Battle of the Marne D. Battle of Verdun...
1 answer

Cual es el vehículo en el que viajaban en el cuento el ruido de un trueno

Cual es el vehículo en el que viajaban en el cuento el ruido de un trueno...
1 answer

How did manifest Destiny deepen divisions among U.S. citizens

How did manifest Destiny deepen divisions among U.S. citizens...
1 answer

Which of the following words is an iamb A. Chalkboard B. Bouncing C. Elvis D. Repair

Which of the following words is an iamb A. Chalkboard B. Bouncing C. Elvis D. Repair...
1 answer

How to balance the equation H2SO4 + Pb(OH)4 = Pb(SO4)2 + H2O

How to balance the equation H2SO4 + Pb(OH)4 = Pb(SO4)2 + H2O...
1 answer

By mistake, you added salt instead of surgar to the oil. How can you remove the salt?

By mistake, you added salt instead of surgar to the oil. How can you remove the salt?...
2 answers

\testcvbfheufheufheufheufheuhfuehfuehfuehfuefh

\testcvbfheufheufheufheufheuhfuehfuehfuehfuefh...
1 answer

Prompt Robinson Crusoe is an adventure novel about one man's seafaring adventures that change who he is and how perceives the world. Describe a significant event in your life that made you stop and think about your own destiny or approach to life.

Prompt Robinson Crusoe is an adventure novel about one man's seafaring adventures that change who he is and how perceives the world. Describe a significant event in your life that made you stop and think about your own destiny or approach to life....
2 answers

-2/3 divided by 2 1/4 simplified

-2/3 divided by 2 1/4 simplified...
1 answer

You think of a number from the first 20 negative integers what is the probability that the integers chosen will be divisible by 4

you think of a number from the first 20 negative integers what is the probability that the integers chosen will be divisible by 4...
1 answer

Can somebody give me another supporting idea topic sentence for C. And add 3 statement to it plz thanks! It’s for my essay title what does a poppy symbolize? (WILL MARK BRAINLIEST)

Can somebody give me another supporting idea topic sentence for C. And add 3 statement to it plz thanks! It’s for my essay title what does a poppy symbolize? (WILL MARK BRAINLIEST)...
2 answers

Why does all the water of the earth not get evaporated during hot summer days?​

why does all the water of the earth not get evaporated during hot summer days?​...
1 answer

9. Which of these descriptions of a triangle ABC are directions that can be followed to draw exactly one shape?a. AB = 2.5 in. , AC = 2 in. , <B= 40° b. AB = 2.5 in. , AC = 1 in., <A= 40° c. AB = 2.5 in., <B = 60°, <A= 40° d. AB = 2.5 in., <B = 60°, <A= 130°​

9. Which of these descriptions of a triangle ABC are directions that can be followed to draw exactly one shape?a. AB = 2.5 in. , AC = 2 in. , <B= 40° b. AB = 2.5 in. , AC = 1 in., <A= 40° c. AB = 2.5 in., <B = 60°, <A= 40° d. AB = 2.5 in., <B = 60°, <A= 130°​...
1 answer

1. Sensation is to as perception is to a. vision, olfaction b. conscious, unconscious c. awareness, interpretation d. taste, vision.​

1. Sensation is to as perception is to a. vision, olfaction b. conscious, unconscious c. awareness, interpretation d. taste, vision.​...
1 answer

Use substitution to slice this linear system 3x-2y=6 4y= -8

Use substitution to slice this linear system 3x-2y=6 4y= -8...
2 answers

The large rounded "brain"'' near the center of the cell is the

the large rounded "brain"'' near the center of the cell is the...
1 answer

Here are the ages in years of 10 children 4 9 6 7 3 5 2 6 4 6 What is the mode median and range

here are the ages in years of 10 children 4 9 6 7 3 5 2 6 4 6 What is the mode median and range...
1 answer

How much of a stick of butter is 1/2 cup?

How much of a stick of butter is 1/2 cup?...

-- 0.012015--