Which of the following represents an example to calculate the sum of the numbers (accumulator)?A. number += numberB. total += numberC. total = numberD. total + number = total

Respuesta :

Answer: The correct option would be,

B. total += number

Step-by-step explanation:

Since, the variable used to keep the running total is called sum of the numbers or accumulator,

Thus, accumulator = total + number,

i.e. we obtain accumulator by assigning total to total plus number.

Or, accumulator is,

total += number,

Hence, OPTION 'B' is correct.

ACCESS MORE