What is a counter in a loop? different forms an accumulator?
Follow = 5 thanks
Don't follow to unfollow
Answers
Answered by
2
Answer:
In computer programming a loop counter is the variable that controls the iterations of a loop (a computer programming language construct).
Accumulator variable
It is initialized to zero and is incremented in each repetition with different values. This program asks the user for 5 numbers and returns the sum. For this, a counter is used to control the number of times we ask the user for numbers and an accumulator to calculate the sum of the 5 numbers.
Similar questions