Design a program that will ask the user to enter the amount of a purchase. The program should then compute the federal and provincial sales tax. Assume the federal sales tax is 10 percent and the provincial sales tax is 5 percent. The program should display the amount of the purchase, the federal sales tax, the provincial sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase plus the total sales tax).
Start
Declare Real amount
Declare Real federalSalesTax
Declare Real provincialSalesTax
Declare Real totalSalesTax
Declare Real totalSale
Display "Enter the amount of a purchase: "
Input amount
Set federalSalesTax=0.1*amount
Set provincialSalesTax=0.05*amount
Set totalSalesTax=federalSalesTax+provincialSalesTax
Set totalSale=amount+totalSalesTax
Display "The amount of the purchase: ",amount
Display "The federal sales tax: ",federalSalesTax
Display "The provincial sales tax: ",provincialSalesTax
Display "The total sales tax: ",totalSalesTax
Display "The total of the sale: ",totalSale
Stop
Comments
Leave a comment