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

For which of these does mRNA provide the code? A. DNA B. proteins C. gametes D. organelles
The story problem and solution are part of what story element
Can you help me solve and describe the steps used to find x for the equation 2(x + 4) – 10 = 12
2. How did Texas help WWII? Explain
Simplify the expression. 3 + 2 • (–8) A. –40 B. 40 C. 13 D. –13 Please help me
give 2 examples of how rocks color provide clues
17) Black smoke rises in the air from a factory in Georgia. The black smoke is a pollutant. When this pollutant returns to Earth it becomes acid rain. How d
enzo picked 56 Strawberry's at a farm this is 25 more than the number of apples he picked
how can the way that roosevelt created the ccc be considered a political compromise
Is 2/5 greater than 1/2