#include using namespace std; int main() { float taxRate, saleAmount; char residence; // get input cout << "Enter the amount of the sale: "; cin >> saleAmount; if (saleAmount <= 0) { cout << "Error: sale amount must be greater than 0!" << endl; return 0; // end program } // end if cout << "enter I for in-state and O for out-of-state: "; cin >> residence; // Set taxRate based on residence // in-state has tax rate of .05 // out-of-state has tax rate of 0 if ((residence == 'I') || (residence == 'i')) { taxRate = .05; } else { taxRate = 0; } saleAmount = saleAmount + (saleAmount * taxRate); cout << "The total is " << saleAmount << endl << endl; return 0; } // end main