exercise4.rb