Answer:
Algorithm:
1. Declare variables "cost","state_tax" and "federal_tax".
2.Initialize these variables.
3.Create a variable "cust_money".
3.1 Ask user to give money.
3.2 Assign this to "cust_money".
4. Calculate total_tax=state_tax+federal_tax
4.1 Calculate total_to_be_paid=cost(1+total_tax)
5. Calculate change_to_give= cust_money-total_to_be_paid
6.Print the change_to_give
7. End the program.
Explanation:
Declare variables and initialize "cost" with initial cost of item, "state_tax" with state tax and "federal_tax" with federal tax on the item. Ask user to give money and assign it to "cust_money". calculate the total tax=state+federal tax. Then calculate the total to be paid for item as cost*(1+total tax). Subtract the total paid from customer money and print the change to give user.