billAm = io.read("*n")
if(billAm>=200 and billAm<=999)
then
discount = billAm/20
payAm = billAm-discount
print('The amount you have to pay=',payAm)
elseif(billAm>=1000 and billAm<=4999)
then
discount = billAm/10
payAm = billAm-discount
print('The amount you have to pay=',payAm)
elseif(billAm>=5000)
then
discount1 = billAm/10
discount2 = billAm/20
discount = discount1+discount2
payAm = billAm-discount
print('The amount you have to pay=',payAm)
else
print('The amount you have to pay=',billAm)
end
To embed this project on your website, copy the following code and paste it into your website's HTML: