// Jeremy Huang CS1A Chapter 2, Pp. 81, #4
/*****************************************************************************
* COMPUTE TOTAL RESTAURANT BILL
* ____________________________________________________________________________
* This program calculates the total cost of a restaurant bill by adding tax
* and tip to the original meal charge. The user inputs the tax and tip as a
* percent in which the program takes those values to compute and add to the
* original meal charge. The program then outputs the original meal charge,
* tax, tip, and the total bill.
* ___________________________________________________________________________
* INPUT
* mealCost : cost of the original meal
* taxRate : the tax rate
* tipRate : the tip rate
*
* OUTPUT
* mealCost : cost of the original meal
* taxAmount : the tax amount
* tipAmount : the tip amount
* totalBill : the total bill (meal+tax+tip)
*
* **************************************************************************/
#include <iostream>
using namespace std;
int main() {
//Declaring variables
float mealCost = 44.50;
float taxRate = 0.0675;
float tipRate = 0.15;
//Computing formulas
float taxAmount = mealCost*taxRate;
float tipAmount = mealCost*tipRate;
float totalBill = mealCost+taxAmount+tipAmount;
//Output
cout<<"Meal Cost: $"<<mealCost<<endl;
cout<<"Tax Amount: $"<<taxAmount<<endl;
cout<<"Tip Amount: $"<<tipAmount<<endl;
cout<<"Total Bill: $"<<totalBill;
//End program
return 0;
}