Answer to Question #28010 in C++ for rousan
When the user done from choosing the program will calculate his bill (فاتورة) (total bill is the summation of all prices of all drinks chosen by the user.)
Once the total bill has been calculated the bill will be issued for the user after adding the tax that is equal 16%.
using namespace std;
cout<<"enter\n1 for Tea 2$\n2 for Coffee 3$\n3 for juice 4$\n-1 to exit\n";
double sum = 0;
ch = outMenu();
case 1: sum+=2*1.16; cout<<"Tea added\n"; break;
case 2: sum+=3*1.16; cout<<"Cofee added\n"; break;
case 3: sum+=4*1.16; cout<<"Juice added\n"; break;
case -1 : cout<<"Bill : "<<sum<<endl; break;
default: cout<<"wrong input, try again!\n";
if (ch == -1) break;
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!