-3

The target of the flowchart to get the sum of integer numbers from 1 to 3

The variables I have:

  • N stands for the initial value
  • sum

so my question is why is variable N considerd a counter and why sum is considerd an accumulating variable

ljgw
  • 2,751
  • 1
  • 20
  • 39

1 Answers1

0

I suppose N is used as a control variable in a loop. (it goes from 1 to 2 to 3 - as a counter) and sum is updated on every iteration of the loop (it accumulates 1, 2 and 3 to form the result).

ljgw
  • 2,751
  • 1
  • 20
  • 39