Written in C necessary program is Codeblocks Solutioninclud


Written in C++, necessary program is Codeblocks.
======================================================================= */

Solution

#include <iostream>
#include <iomanip>   //for manipulator functions setprecision,fixed
using namespace std;

#define SALES_TAX_RATE .0825   //symbolic constants
#define TIP_PERCENTAGE .15

int main()
{
   double   meal_price,total_price,sales_tax,tip;
   int guests;
  
   cout<<\"Enter price of the prix fixe meal ordered\";
   cin>>meal_price;
   cout<<\"\ Enter number of prix fixe meals ordered by the customer(s)\";
   cin>>guests;
   total_price = meal_price*guests;   //compute total price
   sales_tax = total_price*SALES_TAX_RATE; //compute sales tax
   tip = (total_price+sales_tax)*TIP_PERCENTAGE; //compute tip

   cout<<fixed<<setprecision(2);
    cout<<\"\ Betty Boop\";
    cout<<\"\ C.S.1428.25? \";      // \'?\' represents student\'s lecture section #             
    cout<<\"\ Lab Section: L?\";    // \'?\' represents student\'s lab section #
    cout<<\"\ --/--/-- \";         // dashes represent due date, month/day/year
    cout<<endl;          //<blank line>
    cout<<\"\ Prix Fixe Price:    $\"<<meal_price;
    cout<<\"\ \\t\\t         x\"<<guests;
    cout<<\"\ Total for \"<<guests<<\" meals: \"<<total_price;
    cout<<\"\ Sales Tax @\"<<SALES_TAX_RATE<<\"    \"<<sales_tax;      
    cout<<\"\ \"<<TIP_PERCENTAGE<<\"% Tip \"<<\"     \"<<tip;         
    cout<<\"\ Total Due:          $\"<< total_price+ sales_tax+tip; //add all expenses
  
   return 0;
}

output:

 Written in C++, necessary program is Codeblocks. ======================================================================= */Solution#include <iostream> #i

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site