Last active
August 29, 2015 13:56
-
-
Save ewhitebloom/9076006 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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