Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that will compute the total sales tax on a $95 purchase. Assume the state sales tax is 6% and the county

Write a C++ program that will compute the total sales tax on a $95 purchase. Assume the state sales tax is 6% and the county sales tax is 2%. You only have to output the total sales tax. You should not output any text nor should to output the $. Make sure you end your output with the endl or "/n" new line character. You must calculate the total taxes in the program, and then output them. Do not calculate them outside of the program.

Your program should assign the value of 95 to a variable, you should not read in the value from cin. If you try to read in the value from cinyour program will not pass the test in Submit mode.

Create variables for the purchase price, state sales tax rate, county sales tax rate, and the total sales that that you will be calculating. Give these variables meaningful names. The following are NOT meaningful variable names - p, st, co, ts. Examples of a meaningful variable names would be purchasePrice.

Finally, do not include a system("pause"); statement in your program.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions