跳到主要内容

Totalling & counting

English

Totalling: a running total

  • Totalling adds up a series of numbers.
  • Start a total at 0, then add each value to it.
  • The pattern total = total + value is called an accumulator.

Tracing a loop: total grows to 43 and count to 4

讲义

登录或创建账户

IGCSE, A-Level & AP