Scala exercise for Cengage's Friday afternoon polyglot jams.  Solve a simple problem using functional or imperative style coding.