Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 2 - Monthly Business Sales Tax Adapted from Textbook Problem at the end of Chapter 3 A retail business must file a monthly sales

image text in transcribed

Lab 2 - Monthly Business Sales Tax Adapted from Textbook Problem at the end of Chapter 3 A retail business must file a monthly sales tax report listing the sales for the month and the amount of sales tax collected (county tax plus state tax). Write a program that asks for the month and year as well as the total amount collected at the register" (total money taken in from all sales transactions which will include taxes i.e., sales plus all taxes). The program should first calculate the amount of the sales using the formula: Sales = Total Collected (1 + state tax rate + county tax rate) Then calculate the amount of county sales tax, the amount of state sales tax, and the total tax all based on sales. Assuming amount collected of 26572.89, a state tax rate of 4 percent, and the county tax rate of 2 percent, your code needs to output the following report: => Note: This is not your test data for submission but you could use it to check your output. Month: August 2018 Total Collected: Sales: County Sales Tax State Sales Tax: Total Sales Tax: 26572.89 25068.76 501.38 1002.75 1504.13 Checkpoints: Documentation O Name o Lab Number, name and purpose of program O Minimum of 4 other meaningful comments in the code (e.g. //Statements is NOT meaningful o Self-documenting variable names Input the month and year as one string. Hint: use getline() Rate of state sales tax of 7.50% is to be a preprocessor directive (this means the identifier name must be all UPPERCASE and begin with #define). Rate of county sales tax of 2.25% is to be a memory constant declared local to main(). Test data: December 2019 and total collected of 54547.53 Output is to contain your name printed using cout object Output is to be copied and pasted as a comment below the source code. Decimal points must be lined up beautifully as shown above. This means you need to use iomanip, setprecision(), fixed, setw() at minimum. Absolutely no global variables. Declare variables in function main()

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions