Answer:
#include <iostream>
using namespace std;
int main()
{
double purchasePrice = 95;
double stateSalesTaxRate = 0.06;
double countySalesTaxRate = 0.02;
double totalSalesTax;
totalSalesTax = (purchasePrice * stateSalesTaxRate) + (purchasePrice * countySalesTaxRate);
cout << totalSalesTax << endl;
return 0;
}
Step-by-step explanation:
Initialize the purchasePrice, stateSalesTaxRate, and countySalesTaxRate and declare the totalSalesTax
Calculate the totalSalesTax; multiply the price by state tax rate to find state tax, multiply the price by county tax rate to find county tax, and sum these values
Print the totalSalesTax