Update problem03.rb

solved using recursion