//Tip based on service #include using namespace std; int main(void) { double cost, tip; char service; cout<<"Enter cost of meal:$"; cin>>cost; cout<<"Was the service good (Y/N)?"; cin>>service; switch (service) { case 'Y': case 'y': tip=cost*0.20; break; //20% for good service default: tip=cost*0.15; break; //15% if not } //switch cout<<"The tip is $"<