Answer to Question #291017 in Algorithms for Kaur

Question #291017

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).


1
Expert's answer
2022-01-27T07:46:55-0500
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS