43.3k views
0 votes
A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected. The state sales tax rate is 4 percent and the county sales tax rate is 2 percent. Write a program that asks the user to enter the total sales for the month. The application should calculate and display the following: • The amount of county sales tax • The amount of state sales tax • The total sales tax (county plus state)

User Lord Midi
by
5.5k points

1 Answer

2 votes

Answer:

Step-by-step explanation:

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

const double total = 32905.65;

double salesTax = total*(.04);

double countyTax = total*(.02);

double productSales =total-salesTax-countyTax;

double totalTax = salesTax+countyTax;

cout << "Month: September" <<endl;

cout << "Year: 2008" << endl;

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

cout << "Total collected: $" <<fixed << setprecision(2) << total << endl;

cout << "Product Sales: $" << fixed<< setprecision(2) << productSales <<endl;

cout << "County Sales Tax: $" <<fixed << setprecision(2) << countyTax <<endl;

cout << "State Sales Tax: $" <<fixed << setprecision(2) << salesTax << endl;

cout << "Total Sales Tax: $" <<fixed << setprecision(2) << totalTax << endl;

system("pause");

return 0;

}

User BimoZX
by
4.2k points