Condensing Code

Have a look at Planning and Implementing a Program

...R