|
1 1 2 4 3 9 4 16 5 25 |
|
For loops can also also work with characters. The following program will print all the capital letters, one to a line.
|
|
count = 6 count = 7 count = 8 count = 9 count = 10 |
|
Just before loop. Right after loop. |
|
You cannot change the value of the loop control variable. You must allow Turing to control what value it has. The following program would have an error:
|
|