next up previous
Next: About this document ...

ESC 251 HW 13 Due: Oct. 4

(4 pts) Modify the program we wrote in class that computes the sum of positive integers. In this case, change the program so that it will compute the sum of a series of integers that can include positive, negative and zero values. The trick with this program is devising a way to exit the program. You can use any approach that will work for the specific set of numbers: 4, 6, 7, -9, 3, -10, 0, 2, 11, -5.
(4 pts) Repeat Problem 1, but this time use a DO WHILE loop instead of an uncounted DO loop. This one is a little trickier than Problem 1.