Skip to content

Instantly share code, notes, and snippets.

@ewhitebloom
Last active August 29, 2015 13:56
Show Gist options
  • Save ewhitebloom/9076006 to your computer and use it in GitHub Desktop.
Save ewhitebloom/9076006 to your computer and use it in GitHub Desktop.
light = 5
medium = 7.50
bold = 9.75
puts "How much money does the customer owe?"
owed = gets.chomp.to_f
puts "How much money did the customer give you?"
provided = gets.chomp.to_f
change = provided - owed
if change >= 0
puts "Change due is: \n$#{'%.2f' % change} due \n at #{Time.now.strftime('%m/%d/%y %I:%M %p')}."
else
puts "Not enough money given by customer!"
exit
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment