Write a program that will ask the user to enter the amount of a purchase. The program shouldthen compute the state and county sales tax. Assume the state sales tax is 5 percent and thecounty sales tax is 2.5 percent. The program should display the amount of the purchase, thestate sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sumof the amount of purchase plus the total sales tax). Hint: Use the value 0.025 to represent 2.5 percent, and 0.05 to represent 5 percent.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section: Chapter Questions
Problem 5PP
icon
Related questions
Question

Sales TaxWrite a program that will ask the user to enter the amount of a purchase. The program shouldthen compute the state and county sales tax. Assume the state sales tax is 5 percent and thecounty sales tax is 2.5 percent. The program should display the amount of the purchase, thestate sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sumof the amount of purchase plus the total sales tax).

Hint: Use the value 0.025 to represent 2.5 percent, and 0.05 to represent 5 percent.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr