#include<iostream>
#include<iomanip>
using namespace std;

int main ()
{
    int month, year;
    float totalCollected, Sales, CountySalesTax, StateSalesTax;
    float TotalSalesTax;
    
    std::cout<< " What is the Month:";
    std::cin>>month;
    std::cout<<"What is the year:";
    std::cin>>year;
    std::cout<<"What is the total amount collected at register:$";
    std::cin>>totalCollected;
    std::cout<< setprecision (2) << fixed;
    float sales=totalCollected/1.06;
    CountySalesTax=sales*.02;
    StateSalesTax=sales*.04;
    TotalSalesTax=CountySalesTax+StateSalesTax;
    
    std::cout<<"------------------"<<
    
    std::cout<<"Total Collected:" << setw(8)<<totalCollected<<endl;
    std::cout<<"Sales:"           << setw(8)<<sales<<endl;
    std::cout<<"County Sales Tax:"<< setw(8)<<CountySalesTax<<endl;
    std::cout<<"State Sales Tax:" << setw(8)<<StateSalesTax<<endl;
    std::cout<<"Total Sales Tax:" << setw(8)<<TotalSalesTax<<endl;
    system ("pause");
    return 0;
    
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.