Programming Exercise: Terrific, Terrific, Terrific!

The goose always repeated everything she said because . . . she was a mom. Perhaps she had been repeating herself to her goslings so long, she began to talk that way perpetually.

§ 1. The Exercise

In this programming exercise, you will get practice using several basic programming constructs found in most high-level programming languages including arithmetical and logical operations and operators, variables, arrays, conditionals, loops, and subroutines. Warm up drills provide the opportunity to focus on subsets of these skills in isolation. The main exercise introduces an interesting data compression problem and guides you through the process of creating several subroutines related to the problem. More challenging exercises follow the main exercise.

A. Warm Up Drills

B. The Main Exercise

C. More Challenging Exercises


§ 2. Programming Language:

§ 3. Scratchpad

§ 4. Recommended Reading

§ 5. Hints and Answers