Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This need to be done with c++ You have been given the task of designing a progra

ID: 3768770 • Letter: T

Question

This need to be done with c++
You have been given the task of designing a program to input a customer's purchase subtotal. You will use the following inputs: dblSubtotal Compute the tax using 6 ½ percent sales tax (0.065) Your program must print out a receipt stating the total amount that they ow. The format for the receipt is as follows: Here is Your Receipt: Subtotal: S (subtotal amount entered) Tax: S (computed tax) Total amount Due: S (computed total) Upload yourC++program into the Assignment and submit when completed.

Explanation / Answer

#include<iostream>
#include<windows.h>
using namespace std;
int main()
{
char *kinds[5] = {" Chocolate "," Cheese "," Pandan "," Fruit "," Banana "},pitz;
int order1=0,order2=0,order3=0,order4=0,order5=0,quantity,item,chocake=240,checake=230,pand =270,frui =300,bana =220;
float payable=0,cash,price,change,total1=0,total2=0,total3=0,total4=0,total5=0,sum = 0,n;
system ("color F2");
cout<<" -Welcome to Rigz Cakeshop- "<<endl;
cout<<" Please choose your order: "<<endl;
cout<<" 1)Chocolate P240.00";
cout<<" 2)Cheese P230.00";
cout<<" 3)Pandan P270.00";
cout<<" 4)Fruit P300.00";
cout<<" 5)Banana P220.00";
cout<<endl;
  
  
do {
cout<<" Please choose your order from the list: ";
cin>>item;   
payable=payable+total1;
  
  
switch (cake) {
case 1:
cout<<" You ordered for:"<<kinds[0]<<endl;
cout<<" Price: P"<<chocake<<endl;
cout<<" How many: ";
cin>>order1;
total1=chocake*order1;
cout<<" Total: P"<<total1<<endl;
break;
case 2:
cout<<" You ordered for:"<<kinds[1]<<endl;
cout<<" Price: P"<<checake<<endl;
cout<<" How many: ";
cin>>order2;
total2=checake*order2;
cout<<" Total: P"<<total2<<endl;
break;
case 3:
cout<<" You ordered for:"<<kinds[2]<<endl;
cout<<" Price: P"<<pandcake<<endl;
cout<<" How many: ";
cin>>order3;
total3=pandcake*order3;
cout<<" Total: P"<<total3<<endl;
break;
case 4:
cout<<" You ordered for:"<<kinds[3]<<endl;
cout<<" Price: P"<<fruicake<<endl;
cout<<" How many: ";
cin>>order4;
total4=fruicake*order4;
cout<<" Total: P"<<total4<<endl;
break;
case 5:
cout<<" You ordered for:"<<kinds[4]<<endl;
cout<<" Price: P"<<banacake<<endl;
cout<<" How many: ";
cin>>order5;
total5=banacake*order5;
cout<<" Total: P"<<total5<<endl;
break;
default:
cout<<" Sorry it is not available here."<<endl<<endl;
char f;
cout<<" Would you like to reset the program to choose order again? (Y or N): ";
cin>>f;
system("cls");
if((f=='Y')||(f=='y')) {
WinExec("a-piece-of-cake.exe", SW_SHOW);
exit(1);
} else {
return(0);
}
break;
  
}
cout << " Do you want to order another (y/n)? ";
       cin >> pitz;
               }
while ((pitz == 'y')||(pitz == 'Y'));
payable=payable+total1+total2+total3+total4+total5;
cout<<" Amount to be paid: P"<<payable;
  
do {
cout<<" Your cash is: P";
cin>>cash;
if (cash<payable){
cout<<" Your money is not enough. "<<endl;
}
}

while (cash<payable);
  
change=cash-payable;
cout<<" Your change is: P"<<change<<" "<<endl<<endl;
  
cout<<" For your receipt: ";
system("pause");
system("cls");
system("color E0");
  
  
  
  
  
  
  
cout<<" O F F I C I A L R E C E I P T"<<endl;
cout<<" -Rigz Cakeshop- ";
  
  
cout<<" You ordered for numbers: ";
quantity=order1+order2+order3+order4+order5;
cout<<" Total quantity: "<<quantity;
cout<<" Cash: P"<<cash;
cout<<" Total: P"<<payable;
cout<<" Change: P"<<change;
cout<<" Thank you,please come again!"<<endl;
cout<<" Also try our other items. "<<endl;
cout<<" 1)Chocolate P240.00";
cout<<" 2)Cheese P230.00";
cout<<" 3)Pandan P270.00";
cout<<" 4)Fruit P300.00";
cout<<" 5)Banana P220.00"<<endl;
cout<<" *We accept occasions"<<endl;

cout <<" Time: "<<__TIME__;
cout<<" Created by: Rigor N. Cadiz";
cout<<" Date: "<<__DATE__<<endl;
  
  
  

getchar();
cin.get();
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote