Welcome to Mang Brix Karinderya!

mail@pastecode.io avatar
unknown
plain_text
a year ago
11 kB
2
Indexable
Never
#include<bits/stdc++.h>
#include <iomanip>


using namespace std;
double tfood(double a, double b, double c, double d, double e, double f, double g, double h);
double tdrinks(double k, double l, double m, double n, double o);
double xtra(double p, double q, double r, double s, double t, double u, double v);
double total(double w, double x, double y);

int main(){
  
int order = 1;
int num1=0, num2=0, num3=0, num4=0, num5=0, num6=0, num7=0, num8=0, num9=0, num10=0, num11=0, num12=0, num13=0, num14=0, num15=0, num16=0, num17=0, num18=0, num19=0, num20=0;
double Price1= 60.00, Price2= 40.00, Price3= 60.00, Price4= 40.00, Price5= 50.00, Price6=60.00, Price7=60.00, Price8=40.00, Price9=15.00, Price10=20.00, Price11=20.00, Price12=60.00, Price13=55.00, Price14=15.00, Price15=20.00, Price16=35.00, Price17=35.00, Price18=15.00, Price19=15.00, Price20=20.00;
double Sale1=0, Sale2=0, Sale3=0, Sale4=0, Sale5=0, Sale6=0, Sale7=0, Sale8=0, Sale9=0, Sale10=0, Sale11=0, Sale12=0, Sale13=0, Sale14=0, Sale15=0, Sale16=0, Sale17=0, Sale18=0, Sale19=0, Sale20=0, Food, Drinks, Extras, Bill;
char choice;

do
{
system ("clear");
cout<<"Welcome to Mang Brix Karinderya! \n\n"
    <<"-------------------------------------------------------------------\n"
    <<"This is our menu for today!\n\n"
     <<"1.Bulalo /w rice	       ₱60.00\n"
     <<"2.Sisig /w rice		       ₱40.00\n"
	 <<"3.Porkchop /w rice	       ₱60.00\n"
	 <<"4.Longanisa /w rice	       ₱40.00\n"
	 <<"5.Bicol express	/w rice        ₱50.00\n"
     <<"6.Adobo /w rice                ₱60.00\n"
     <<"7.Pork Sinigang /w rice        ₱60.00\n"
     <<"8.Fried Chicken /w rice        ₱40.00\n\n"
     <<"---------------------------------------------------\n" 
	 <<"Drinks & Beverages\n\n"
     <<"9.Iced Tea                     ₱15.00\n"
     <<"10.Coke                        ₱20.00\n"
     <<"11.Sprite                      ₱20.00\n"
     <<"12.San Miguel Pale Pilsen Beer ₱60.00\n"
     <<"13.San Miguel Light Beer       ₱55.00\n\n"
     <<"---------------------------------------------------\n"   
     <<"Extras\n\n"
     <<"14.Plain rice                  ₱15.00\n"
     <<"15.Fried Rice                  ₱20.00\n"
     <<"16.Halo-Halo                   ₱35.00\n"
     <<"17.Mais Con Yelo               ₱35.00\n"
     <<"18.Banana Cue                  ₱15.00\n"
     <<"19.Turon                       ₱15.00\n"
     <<"20.Buko Pandan                 ₱20.00\n";
cout<<"-------------------------------------------------------------------\n";
cout<<"what would you like to order?: \n";
cin>>order;
switch(order)
			{
                
                case 0:
                break;
				case 1:     
                cout<<"How many Bulalo would you like to order?: \n";
                cin>>num1;
                Sale1 = Price1 * num1;
                break;
                
				case 2: 
                cout<<"How many Sisig would you like to order?: \n";
				cin>>num2;               
                Sale2= Price2 * num2;
                break;
                
                case 3: 
                cout<<"How many Porkchop would you like to order?: \n";
                cin>>num3;
                Sale3= Price3 * num3;
                break;
                
                case 4: 
                cout<<"How many Longanisa would you like to order?: \n";
                cin>>num4;
                Sale4= Price4 * num4;
                break;

                case 5: 
                cout<<"How many Bicol express would you like to order?: \n";
                cin>>num5;
                Sale5= Price5 * num5; 
                break;
        
                case 6: 
                cout<<"How many Adobo would you like to order?: \n";
                cin>>num6;
                Sale6= Price6 * num6; 
                break;
                
                case 7: 
                cout<<"How many Sinigang would you like to order?: \n";
                cin>>num6;
                Sale7= Price7 * num7; 
                break;
        
                case 8: 
                cout<<"How many Iced tea would you like to order?: \n";
                cin>>num8;
                Sale8= Price8 * num8; 
                break;
        
                case 9: 
                cout<<"How many Iced tea would you like to order?: \n";
                cin>>num9;
                Sale9= Price9 * num9; 
                break;
    
                case 10: 
                cout<<"How many Coke would you like to order?: \n";
                cin>>num10;
                Sale10= Price10 * num10; 
                break;
        
                case 11: 
                cout<<"How many Sprite would you like to order?: \n";
                cin>>num11;
                Sale11= Price11 * num11; 
                break;
                
                case 12: 
                cout<<"How many San Miguel Pale Pilsen Beer would you like to order?: \n";
                cin>>num12;
                Sale12= Price12 * num12; 
                break;
        
                case 13: 
                cout<<"How many San Miguel Light Beer would you like to order?: \n";
                cin>>num13;
                Sale13= Price13 * num13; 
                break;
    
                case 14: 
                cout<<"How many Extra Plain Rice would you like to order?: \n";
                cin>>num14;
                Sale14= Price14 * num14; 
                break;
        
                case 15: 
                cout<<"How many Extra Fried Rice would you like to order?: \n";
                cin>>num15;
                Sale15= Price15 * num15; 
                break; 
                
             
                case 16: 
                cout<<"How many Halo-Halo would you like to order?: \n";
                cin>>num16;
                Sale16= Price16 * num16; 
                break; 
                
        
                case 17: 
                cout<<"How many Mais con yelo would you like to order?: \n";
                cin>>num17;
                Sale17= Price17 * num17; 
                break; 
                
          
                case 18: 
                cout<<"How many Banana cue would you like to order?: \n";
                cin>>num18;
                Sale18= Price18 * num18; 
                break; 
                
        
                case 19: 
                cout<<"How many Turon would you like to order?: \n";
                cin>>num19;
                Sale19= Price19 * num19; 
                break; 
                
        
                case 20: 
                cout<<"How many Buko Pandan would you like to order?: \n";
                cin>>num20;
                Sale20= Price20 * num20; 
                break;
        
                default: cout<<"Please choose a valid item from our list\n";
                }
    
{
system("clear");
cout<<"--------------------------------------------------------\n";
cout<<"You have ordered:\n\n";

cout<<left<<setw(15)<<"ITEM"<<right<<setw(10)<<"QUANTITY"<<right<<setw(15)<<"UNIT PRICE"<<right<<setw(20)<<"AMOUNT OF SALE\n";


cout<<"Bulalo: "<<setw(14)<<right<< num1 <<setw(14)<<right<< Price1 <<setw(16) <<right<< Sale1<<endl;

cout<<"Sisig: "<<setw(15)<<right<< num2 <<setw(14)<<right<< Price2 <<setw(16) <<right<< Sale2<<endl;

cout<<"Porkchop: "<<setw(12)<<right<< num3 <<setw(14)<<right<< Price3 <<setw(16) <<right<< Sale3<<endl;

cout<<"Longanisa: "<<setw(11)<<right<< num4 <<setw(14)<<right<< Price4 <<setw(16) <<right<< Sale4<<endl;

cout<<"Bicol express: "<<setw(7)<<right<< num5 <<setw(14)<<right<< Price5 <<setw(16) <<right<< Sale5<<endl;

cout<<"Adobo: "<<setw(15)<<right<< num6 <<setw(14)<<right<< Price6 <<setw(16) <<right<< Sale6<<endl;

cout<<"Pork sinigang: "<<setw(7)<<right<< num7 <<setw(14)<<right<< Price7 <<setw(16) <<right<< Sale7<<endl;

cout<<"Fried Chicken: "<<setw(7)<<right<< num8 <<setw(14)<<right<< Price8 <<setw(16) <<right<< Sale8<<endl;

cout<<"--------------------------------------------------------\n";
    
cout<<"Iced tea: "<<setw(12)<<right<< num9 <<setw(14)<<right<< Price9 <<setw(16) <<right<< Sale9<<endl;

cout<<"Coke: "<<setw(16)<<right<< num10 <<setw(14)<<right<< Price10 <<setw(16) <<right<< Sale10<<endl;

cout<<"Sprite: "<<setw(14)<<right<< num11 <<setw(14)<<right<< Price11 <<setw(16) <<right<< Sale11<<endl;

cout<<"San Mig Pale Pilsen: "<<setw(1)<<right<< num12 <<setw(14)<<right<< Price12 <<setw(16) <<right<< Sale12<<endl;

cout<<"San Mig Light Beer: "<<setw(2)<<right<< num13 <<setw(14)<<right<< Price13 <<setw(16) <<right<< Sale13<<endl;
 
cout<<"--------------------------------------------------------\n";
    
cout<<"Plain rice: "<<setw(10)<<right<< num14 <<setw(14)<<right<< Price14 <<setw(16) <<right<< Sale14<<endl;

cout<<"Fried rice: "<<setw(10)<<right<< num15 <<setw(14)<<right<< Price15 <<setw(16) <<right<< Sale15<<endl;
    
cout<<"Halo-Halo: "<<setw(11)<<right<< num16 <<setw(14)<<right<< Price16 <<setw(16) <<right<< Sale16<<endl;

cout<<"Mais con Yelo: "<<setw(7)<<right<< num17 <<setw(14)<<right<< Price17 <<setw(16) <<right<< Sale17<<endl;

cout<<"Banana cue: "<<setw(10)<<right<< num18 <<setw(14)<<right<< Price18 <<setw(16) <<right<< Sale18<<endl;

cout<<"Turon: "<<setw(15)<<right<< num19 <<setw(14)<<right<< Price19 <<setw(16) <<right<< Sale19<<endl;
    
cout<<"Buko Pandan: "<<setw(9)<<right<< num20 <<setw(14)<<right<< Price20 <<setw(16) <<right<< Sale20<<endl;
    
Food=tfood(Sale1, Sale2, Sale3, Sale4, Sale5, Sale6, Sale7, Sale8);
Drinks=tdrinks(Sale9, Sale10, Sale11, Sale12, Sale13);
Extras=xtra(Sale14, Sale15, Sale16, Sale17, Sale18, Sale19, Sale20);
Bill=total(Food, Drinks, Extras);
cout<<"--------------------------------------------------------\n";
    
cout<<"Total Bill: "<< Bill <<endl;   

cout<<"--------------------------------------------------------\n";
    
cout<<"would you like to order again?[Y/N]: ";
cin>>choice;
}
              }
while(choice/= 'y');
    cout<<"thank you for ordering! please procced to the counter to pay and wait for your order.";
return 0;
}
double tfood(double a, double b, double c, double d, double e, double f, double g, double h){
double i;
i=(a+b+c+d+e+f+g+h);
return i;
}
double tdrinks(double j, double k, double l, double m, double n){
double o;
o=(j+k+l+m+n);
return o;
}
double xtra(double p, double q, double r, double s, double t, double u, double v){
double ex;
ex=(p+q+r+s+t+u+v);
return ex;
}
double total(double w, double x, double y){
double z;
z=(w+x+y);
return z;
}