#taxrate
taxrate= 0.175
print "Enter price (ex tax):"
#get the value
s= gets
#cast it to float
subtotal = s.to_f
#check if the value given is negative
if (subtotal<0.0)
then subtotal= 0.0
end
#sum the tax
tax = subtotal * taxrate
puts "Tax on #{subtotal} is #{tax}, so grand total is $#{subtotal+tax}"