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.
1
Expert's answer
2012-12-20T07:55:24-0500
#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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS