Problem 11 - using if statement
Problem 11 - neater using pattern matching