// FILE: MoneyOp.cpp // ILLUSTRATES MONEY OPERATIONS #include #include "money.h" // needed for money data type int main () { // Local declarations const double tax_percent = 6.25; // tax percentage money credit_limit = 5000.00; // credit limit money sale_price; // input - selling price of an item money tax_amount; // output - tax amount money final_cost; // output - final cost // Read price of item. cout << "Enter item price: "; cin >> sale_price; // Compute tax amount tax_amount = sale_price * tax_percent / 100.0; // Compute final cost final_cost = sale_price + tax_amount; // Display sales receipt cout << "Sales receipt" << endl; cout << "Price " << sale_price << endl; cout << "Tax " << tax_amount << endl; cout << "Paid " << final_cost << endl << endl; // Compute new credit limit cout << "Your initial credit limit is " << credit_limit << endl; credit_limit = credit_limit - final_cost; cout << "Your new credit limit is " << credit_limit << endl; return 0; }