Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Monthly Sales Tax A small retail company must file a monthly sales tax report li

ID: 3736787 • Letter: M

Question

Monthly Sales Tax A small retail company must file a monthly sales tax report listing the sales for the month and the amount of sales tax collected. Write a program that asks the user to enter values for the month name as a string, the year as an integer, and the total amount collected in sales (include sales tax) as a floating point value (float or double, your choice!). Assume the state sales tax is 6.75 percent and the county sales tax is 2.00 percent. If the total amount collected is known and the total sales tax is 8.75 percent, the amount of product sales may be calculated as: 1.0875 Where, S is the product sales and T is the total income (product sales plus sales tax). The program should display a report similar to: Month: October 2018 Total Collected: 26572.89 Sales: County Sales Tax: State Sales Tax: Total Sales Tax: $ 2138.05 $ 24434.84 488.70 $ 1649.35

Explanation / Answer

#include <iostream>

using namespace std;

int main() {

string month;

int year;

double amount,sales,C_Tax,S_Tax;

cout<<"Enter the month: "<<endl;

cin>>month;

cout<<"Enter the year: "<<endl;

cin>>year;

cout<<"Enter the total amount collected in sales: "<<endl;

cin>>amount;

sales=amount/1.0875;

C_Tax=sales*2/100;

S_Tax=sales*6.75/100;

cout<<"Month: "<<month<<" "<<year<<endl;

cout<<"----------------------------"<<endl;

cout<<"Total Collected: "<<"$ "<<amount<<endl;

cout<<"Sales: "<<"& "<<sales<<endl;

cout<<"County Sales Tax: "<<"$ "<<C_Tax<<endl;

cout<<"State Sales Tax: "<<"$ "<<S_Tax<<endl;

cout<<"Total Sales Tax: "<<"$ "<<C_Tax+S_Tax<<endl;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote