// Nicolas Ruano CS1A Chapter 2, Pp. 81, #3
/*************************************************************************
*
*------------------------------------------------------------------------*
* Output is where it displays different sales taxes that are being *
* calculated *
* -----------------------------------------------------------------------*
* Input *
* The diefferent sales taxes being provided with how much cost *
* *
* Output *
* The resolved answer of the taxes calculated *
*************************************************************************/
#include <iostream>
using namespace std;
int main() {
// Purchase amount
double purchase = 52.0;
// Tax rates
double stateTaxRate = 0.04; // 4%
double countyTaxRate = 0.02; // 2%
// Compute taxes
double stateTax = purchase * stateTaxRate;
double countyTax = purchase * countyTaxRate;
double totalTax = stateTax + countyTax;
double totalAmount = purchase + totalTax;
// Display results
cout << "Purchase amount: $" << purchase << endl;
cout << "State tax: $" << stateTax << endl;
cout << "County tax: $" << countyTax << endl;
cout << "Total sales tax: $" << totalTax << endl;
cout << "Total amount with tax: $" << totalAmount << endl;
return 0;
}