Question: Q2 . Write a program that will compute the total sales tax on a $45 purchase. Assume that the state sales tax is 4% and
Q2. Write a program that will compute the total sales tax on a $45 purchase. Assume that the state sales tax is 4% and county sales tax is 2%.
Declare a variable called price , of datatype double
Ask the user to enter a price and the user inputs in the purchase price.
Use setprecision(2) like Q1.
in C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
