Add exercise6.rb