60 595
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #20860 in C++ for alahab

Question #20860
write an application that computes the tax and tip on a restaurant bill.The program should ask the user to enter the charge for meal.The tax should be 6.75 percent of the meal charge.The tip should be 15 percent of the total after adding the tax.Display the meal charge,tax amount,and total bill on the screen.
Expert's answer
#include <iostream>

using namespace std;

int main()
{
cout << " enter the charge for meal" << endl;
double n,a,k,m;
cin>>n;

a=6.75*n/100;
k=0.15*(n+a);
m=n+a+k;
cout<<"total="<<m<<endl;

return 0;
}

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