CS21 Homework 3
Due Sunday, September 14 by 11:30pm
Do the following programing exercises from chapter 3 (starting on page
93) and from chapter 4 (starting on page 133).
- 3.6 Write a program to figure out if Gauss was correct when he
said that the sum of the numbers between 1 and 100 is 5050.
- 3.14 Write a program that reads in a list of integers until the
user enters a sentinel value, and then displays the largest number.
- 4.2 Write a program that displays all ten verses of the "This Old
Man" song using a switch statement.
- 4.10 Write a program to display a wedge of stars. Hint: Think
about using a loop within a loop.
- 4.11 Write a program to display a pyramid of stars.
Use cs21handin to turn them in.