Exercise 22

Rewrite the exercise 20, by using a Switch statement.