// Mr. Minich // demo program with a computeTax function #include #include using namespace std; // ************************** function declaration statements **************** double computeTax(double basePrice); // ************************** constant declaration statements **************** const double TAX_RATE = 0.06; int main() { // ********************** variable declaration statements ***************** double price = 0.0; // price of item double tax = 0.0; // amount of sales tax paid double totalPriceWithTax = 0.0; // total price with tax included // ********************** user input ************************************** cout << "Enter a price: "; cin >> price; // ********************** computations ************************************ tax = computeTax(price); totalPriceWithTax = price + tax; // ********************** output display ********************************** cout << "The total price is $" << totalPriceWithTax << endl; system("pause"); return 0; }// end of main // ************************** functions *************************************** double computeTax(double basePrice) { return basePrice * TAX_RATE ; }// end of computeTax