write a program that computes the tax and tip on a restaurant bill for a patron with $44.50 meal charge.the tax should be 6.75 percent of the meal cost.the tips should be 15 percent of the total after adding the tax.display the meal cost,tax amount,tip amount, and total bill on the screen.
1
Expert's answer
2012-12-05T09:58:16-0500
#include <math.h> #include "iostream" using namespace std;
int main() { float p = 44.50; float a,b,s; a= 0.0675*p; b= 0.15*(a+p); s=p+a+b; cout<<"meal: "<<p<<endl; cout<<"tax amount: "<<a<<endl; cout<<"tip amount: "<<b<<endl; cout<<"total bill: "<<s<<endl; system ("PAUSE");
Comments
Leave a comment