Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This program calculates the total due on sales taxes for a quarter period of the year based on the sales and jurisdiction.
- #include <iostream>
- using namespace std;
- //Named constants
- const double Local_Tax_Rate = 0.08875;
- const double Credit_Perc = 0.05;
- int main()
- {
- //Declaring variables
- int Gross, Non_Taxable;
- int Taxable;
- double Vendor_Credit, Pen_And_Int;
- //Statements;
- cout << "Enter two integers, one for Gross, "
- << "one for Non-Taxable: "; //Step 1
- cin >> Gross >> Non_Taxable; //Step 2
- cout << endl;
- cout << "Enter the penalties and interest due at this time: ";
- cin >> Pen_And_Int;
- cout << endl;
- cout << "The numbers you entered are " << Gross
- << " for Gross Sales and " << Non_Taxable
- << " Sales exempt from " << endl;
- cout << " Taxes." << endl;
- cout << " Penalties and Interest = " << Pen_And_Int
- << endl; //Step 3
- cout << "The Taxable total of the Sales for this quarter is = " << Gross - Non_Taxable
- << endl;
- cout << "The pre-tax for this quarter is = " << (Gross - Non_Taxable) * Local_Tax_Rate
- << endl;
- cout << "The amount to be credited to the vendor for this quarter is = " << (Gross - Non_Taxable) * (Local_Tax_Rate) * Credit_Perc
- << endl;
- Vendor_Credit = (Gross - Non_Taxable) * (Local_Tax_Rate)* Credit_Perc;
- cout << "The final calculation of the sales taxes due is = " << (Gross - Non_Taxable) * (Local_Tax_Rate)+(Pen_And_Int)-(Vendor_Credit)
- << endl;
- system("pause");
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment