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

Sound: The more _______ a sound has, the _________ its volume is.
Propane and oxygen react according to the equation: C₃H₈(g) + 5O₂(g) → 3CO₂(g) + 4H₂O(g). How many grams of water can be produced from the complete combustion o
in what way is a gene pool representative of a population
THE EXPRESSION COT THETA/CSC THETA IS EQUAL TO?
The net force acting on a 50 kg crate is 0 N. What is the crate's acceleration
true or false a trapezoid is a polygon, so all polygons are trapezoid. explain.
how many rectangular prism can you make out of 20 snap of cubes
The net force acting on a 50 kg crate is 0 N. What is the crate's acceleration
Sound: The more _______ a sound has, the _________ its volume is.
mike constructed a closed box that measures 2.5 feet long by 3 feet wide by 1.5 feet high. what is the total area of the material mike needs to construct the bo