Question: Say I have a program and it updates the total of a bill for each amount paid by customer. I am having problems with having
Say I have a program and it updates the total of a bill for each amount paid by customer. I am having problems with having the total update for each amount subtracted from the previous total amount in a loop (so it never ends and always calculates the new total). What would the code look like for this type of program in a loop?
For example-
Total Bill: 100
Customer enter amount you wish to pay: 20
Total Bill: 80
Customer enter amount you wish to pay: 40
Total Bill: 40
Step by Step Solution
3.45 Rating (158 Votes )
There are 3 Steps involved in it
binbash bill100 stores 100 echo Total Billbill print the Total Bill escapes the character ... View full answer
Get step-by-step solutions from verified subject matter experts
