63 041
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #19895 in C++ for ainafatin akifeen

Question #19895
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.
Expert's answer
#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");

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions