Added exercise6.rb