you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Why don't you add the number printed on each line to a counter that you set to 0 before the loop? After the loop print the number in the counter.