Solved problem 15 in ruby
Solved problem 16 in ruby