Contact PSVM   (Q & A)  |  Notes Below   Audio  |  [toc]   [prev] Slide 14 of 17 [next]
SIJLesson22 Slide14
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, [14 (top)], 15, 16, 17, [Lab]

Notes for Slide 14
This example is used to show that you might use more
than one loop in your program if you need to first
store values into an array and later process the
values in the array or output them.
Notice also that it is not a simple task to place
a comma in between the values of the array
using a while-condition loop.
This example, as written, will output a comma and a space
at the end of the final element (the 10th element which
exists in scores[9]).
To rewrite this example so it works, a while-true loop
with an if-break statement would work nicely.


1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, [14 (top)], 15, 16, 17, [Lab]