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

A trait in a species that results in it being better suited to survive and reproduce in its environment is called a ______.
Mao Zedong's "Great Leap Forward" could BEST be described as a program designed to change China's
how can if find the least common multiple of two or more numbers
What are the major reservoirs in the carbon cycle
The volume of a triangular prism is half of the volume of a rectangular prism. TRUE OR FALSE?
40,___,37 1/2,36 whats the missing number help!!
In PE class carol runs a distance of 1.17 miles in 9 minutes. At that rate how far does carol run in one minute
please translate these in the simpliest way (french 1) 2. The flag is to adrien and andre. 3. The computer is to us.
The Naturally Made Bath and Body store pays $500 a month for rent and utilities. The average cost for its products to be manufactured is about $3.00 an item. If
Rate is the percent of interest charged for money loaned. a. true b. false