Added exercise3.rb