jbrad1322 jbrad1322
  • 04-07-2019
  • Computers and Technology
contestada

What is the value of x after the following statements execute? int x, y, z; y 12; z 3; X= (y*(z+y-10); A. 36 B. 144 C.60 D. None of these

Respuesta :

PhantomWisdom PhantomWisdom
  • 12-07-2019

Answer:

60

Explanation:

According to the operator precedence, the bracket comes in the top. So, the program solve expression in the bracket first.

In the code, the value of Y is 12  and z is 3

substitute the value in the formula.

X = (12*(3 + 12 - 10)).

So, the program calculate the value (3 + 12 - 10) first which gives 5.

After that program evaluate (12 * 5) which gives 60.

Therefore, the answer is 60.

Answer Link

Otras preguntas

solve by solution y=1/2x+6 and y=4x-1
Can someone help me with this
why has the conflict between india and pakistan over kashmir become such a concern to the world today
What are four factors which influence the ways languages change? A. influence by other languages B. isolation C. poetry D. influence of social or religious grou
Find all solutions in the region [0,2pi) for the equation cos^2(2x)-sin^2(2x)=0
What is one universal theme illustrated by the character relationships in Endgame?
is mold that grows on bread a consuner a producer or a decomposer how do you know
The skin’s major functions include all but which of the following? a) protection from UV radiation b) prevent absorption of chemicals c)protection from microbes
please help!!! i have to finish health class by Sunday. And my school said i could add time on but then said I couldn't so I'm rushing and it would be great if
What occurs when a magnesium atom becomes a magnesium ion?