This file contains hidden or 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
require 'bigdecimal' | |
require 'bigdecimal/util' | |
values = [] | |
puts 'What is the sale price?' | |
print '>' | |
input = gets.chomp | |
while input != 'done' |
This file contains hidden or 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
require 'bigdecimal' | |
require 'bigdecimal/util' | |
puts 'What is the amount due?' | |
total = gets.chomp.to_f | |
puts 'What is the amount tendered?' | |
cash = gets.chomp.to_f | |
if total > cash | |
puts 'WARNING: Customer still owes $0.50! Exiting...' |
NewerOlder