fake3447 fake3447
  • 15-01-2020
  • Computers and Technology
contestada

What value will be assigned to the answer variable as a result of the statement: answer = 3 + 2 * 4 % (2 + 4)A. 2B. 4C. 5D. 10

Respuesta :

Debel
Debel Debel
  • 16-01-2020

Answer:

5

Explanation:

The order of execution is very important in solving the question

( ) - first

* and % operator takes the same amount of precedence then you consider the order from left to right

then + last

3 + 2 * 4 % (2 + 4) = 3 + 2 * 4 % 6 = 3 + 8 % 6 = 3 + 2 = 5

So 5 is the value that will be assigned to the answer variable

Note:

8 % 6 is the remainder of 8/6 which is 2.

Answer Link

Otras preguntas

What would happen to the mountain lion population if the deer became extinct?
What led to scientists accepting Mendel's ideas?
what were the issues that divided republicans during the early reconstruction era
What is bigger , 3/5 or 65%
In what way were the Maya different from the Aztec and Inca civilizations
Write a paragraph identify important element of the government created by the america colonists
John was unable to work on Sundays because he had a church commitment. This is known as a/an
Which of the following describes density only in terms of metric units? a. kilograms per cubic meter b. pounds per square meter c. pounds per cubic foot d.
What was the purpose of the Tiananmen Square demonstrations in Beijing during 1989?
The fatty tissue surrounding the kidneys is important because it ________. A. ensures adequate energy for the adrenal glands to operate efficiently B. stabilize