Machine Problems: Arrays

Be the Machine

I haven't gotten this far with my students.

1. i = 1
2. n[i] = READ
3. Go to #5 if the read failed
4. i = i + 1
5. Go to #2.
6. i = 1
7. t = 0
8. t = t + n[i]
9. i = i + 1
10. if i < 5, go to #9
11. print t
12. Stop

Be the Machinemaster