Solve problems 13,48,63 using Scala.