exit=false
until exit==true do
puts “Libertyland Income Tax Calculator Program”
print “Legal Name:”
legal_name=gets.to_s
print “Enter total income:$”
gross_income=gets.to_f
if gross_income<=15000
puts “Your current annual income exempts you from paying income
taxes.”
else
tax_payer_profile=TaxCalculator.new(legal_name,gross_income)
puts tax_payer_profile
puts “Your tax bill in LibertyLand
is:$#{tax_payer_profile.tax_bill_under_new_regime}”
end
puts “Would you like to continue? yes or no”
print “Response:”
response=gets.to_s
final_response=response.downcase
if final_response==“no”
exit=true
end
end
Why won’t my program terminate when I type in “no” even though I have
set the variable exit equal to “true”, which is my conditional for the
until loop?