Skip to content

Instantly share code, notes, and snippets.

@joseph-ravenwolfe
Last active August 29, 2015 13:56
Show Gist options
  • Save joseph-ravenwolfe/9318909 to your computer and use it in GitHub Desktop.
Save joseph-ravenwolfe/9318909 to your computer and use it in GitHub Desktop.
def performance
stores = {1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0}
stores.keys.each do |store_number|
print "Please enter the amount for store #{store_number}: "
stores[store_number] = (gets.chomp.to_i / 100).floor
end
puts "Sales Bar Chart"
stores.each do |store_number, amount|
puts "Store #{store_number}: #{'*' * amount}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment