//Jacob Silvestre CSC5 Chapter 2, P. 81, #4
//
/**************************************************************
*
* DETERMINE RESTAURANT BILL
* ____________________________________________________________
* This program the tax and tip on $44.50 meal with a 6.75
* percent tax rate and 15 percent tip of the total after
* adding tax.
*
* Computation is based on the formula:
* tax = 44.50 * .065
* tip = (44.50 + tax) * .15
* bill = 44.50 + tax + tip
* ____________________________________________________________
* INPUT
* 44.50 : meal cost
* .0675 : tax rate
* .15 : tip rate
*
* OUTPUT
* mealCost: meal cost
* tax : tax amount
* tip : tip amount
* bill : restaurant bill
*
**************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
double mealCost; //OUTPUT - Meal cost
double tax; //OUTPUT - Tax amount
double tip; //OUTPUT - Tip amount
double bill; //OUTPUT - Restaurant bill
//
// Initialize Program Variables
mealCost = 44.50;
//
// Calculate Tax
tax = mealCost * .0675;
//
// Calculate Tip
tip = (mealCost + tax) * .15;
//
// Calculate Restaurant Bill
bill = mealCost + tip + tax;
//
// Output Result
cout << "Meal cost: $" << mealCost << endl;
cout << "Tax amount: $" << tax << endl;
cout << "Tip amount: $" << tip << endl;
cout << "Restaurant bill: $" << bill << endl;
return 0;
}