#include <iostream>
#include <string>
usingnamespace std;
int main ()
{
string RestaurantBill;
// variable declaration
double
MealCost = 50.00,
tax = .0675,
tip = .1,
tipp = .15,
tippp = .2;
int
MealCost_tax,
bill,
TotalBill,
tip_TotalBill,
// calculate tax of meal cost
MealCost_tax = MealCost * tax;
// calculate bill amount
bill = MealCost_tax + MealCost;
//calculate tip with 10% tax
tip = MealCost * tip ;
//calculate tip with 15% tax
tipp = MealCost * tipp ;
//calculate tip with 20% tax
tippp = MealCost * tippp ;
//calculate the total bill
cout << "The Total is $" << MealCost << " w/o tax" << endl;
cout << "tax amount is $" << MealCost_tax << endl;
cout << "bill amount with 10% tip is $ " << TotalBill + tip << endl;
cout << "bill amount with 15% tip is $ " << TotalBill + tipp << endl;
cout << "bill amount with 20% tip is $ " << TotalBill + tippp << endl;
system("pause");
return 0;
}
It should be followed by a semi-colon (;), not a comma (,). Since the comma is there, the compiler expects another identifier.
Some other things:
Your variable bill (declared on line 18) is set on line 26, but it is unused.
Your variable tip_TotalBill (declared on line 20) is unused.
Your variable TotalBill (declared on line 19) is uninitialized. You never give it a value. You then attempt to use it on lines 40 - 42.