47.7k views
5 votes
Consider the following code:
x=9 y = -2 z=2
print (x + y * z)
What is output?

1 Answer

1 vote

Answer:

14

Explanation: The reason why is because adding a negative is pretty much subtracting by 2. 9-2=7. Then multiply 7 by 2 like add 7 to 7 and you get 14.

User Jeffery
by
7.2k points