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

define el sistema del gobierno ateniense utilizado las siguientes palabras
If 52x + 64b = 4,892, and if x + b = 83 what is the value of x and b?
If 52x + 64b = 4,892, and if x + b = 83 what is the value of x and b?
f(x)=2x^3+13x^2+23x+12
Generate the first 5 terms of this sequence: f(1) = 2 and f(2) = 3, f(n) = f(n - 1) + f(n - 2), for n > 2. A.2, 3, 5, 7, 9 B.2, 3, 4, 7, 11 C.2, 3
The innermost part of a grain that is rich in protein, oils, vitamins, and minerals is known as the a. husk. b. endosperm. c. germ. d. bran.
Find the volume of the cone show below: radius: 12 Height: 16 Side length: 20
Which equation does the graph of the systems of equations solve? 2 linear graphs. They intersect at 1,2 x + 4 = −2x − 1 x + 2 = −3x + 1 −x + 3 = 3x − 1 x +
what agency sticker should be presented inside a childs helmet?
How long did it take Christopher Columbus to travel from Spain to America