//DISPLAY 4.3 A Function Definition #include using namespace std; //### Define a function #####################3 //Computes the total cost, including 5% sales tax, //on number_par items at a cost of price_par each. double total_cost(int number_par, double price_par) { const double TAX_RATE = 0.05; //5% sales tax double subtotal; subtotal = price_par * number_par; return (subtotal + subtotal*TAX_RATE); } int main( ) { double price, bill; int number; cout << "Enter the number of items purchased: "; cin >> number; cout << "Enter the price per item $"; cin >> price; //calling/evoking total_cost function, passing number and price's values //as argument, and storing value returned by the function to bill bill = total_cost(number, price); cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout << number << " items at " << "$" << price << " each.\n" << "Final bill, including tax, is $" << bill << endl; return 0; }