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

Order the ratios from least to greatest: 7:2, 12:4, 20:6, 21:14, 10:5
why did british colonies in the south have the greatest number of slaves
What times what equals 24
“[F]reedom of conscience, freedom of person, freedom of trade and business pursuits, universality of freedom and equality. This is our high destiny, and in natu
what should an operator do when attempting to re-board a personal watercraft (PWC)?
what times what equals 160
What is 1/6 + (2/3 - 1/4) in simplest form
I need help with finding the answer of 21 laps in 7 minutes
What were the names of the two major campaigns fought in Georgia during the Civil War?
What are the three types of power a government may exercise?