Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <sstream>
- using namespace std;
- void capsule();
- void instruction();
- int main()
- {
- string name, pieceorpack, mg;
- int order, orderQuantity, orderTotal, payment, change;
- cout<<"What is the customer's name: ";
- getline(cin,name);
- cout<<" Welcome to my Pharmacy, " + name + "!"<<endl<<endl<<endl;
- capsule();
- instruction();
- cin>>order;
- switch(order)
- {
- case 1:
- cout<<"you are ordering Paracetamol Biogesic. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Paracetamol Biogesic per piece is P07.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 7;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Paracetamol Biogesic per pack is P30.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 30;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 2:
- cout<<"you are ordering Neozep Forte. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Neozep Forte per piece is P09.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 9;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Neozep Forte per pack is P40.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 40;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 3:
- cout<<"you are ordering Bioflu. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Bioflu per piece is P08.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 8;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Bioflu per pack is P35.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 35;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 4:
- cout<<"you are ordering Salbutamol. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Salbutamol per piece is P06.00. We have 2mg and 4mg of Salbutamol. Which do you prefer?(2/4)"<<endl;
- cin>>mg;
- cout<<"You chose " << mg <<"mg. How many piece do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 6;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack == "PACK")
- {
- cout<<"Salbutamol per pack is P27.00. We have 2mg and 4mg of Salbutamol. Which do you prefer?(2/4)"<<endl;
- cin>>mg;
- cout<<"You chose " << mg <<" . How many packs do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 27;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" + x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name <<"!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 5:
- cout<<"you are ordering Enervon Activ. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Enervon Activ per piece is P13.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 13;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Enervon Activ per pack is P60.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 60;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 6:
- cout<<"you are ordering Mepanamic. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Mepanamic per piece is P15.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 15;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Mepanamic per pack is P70.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 70;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 7:
- cout<<"you are ordering Alaxan Fr. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Alaxan Fr per piece is P12.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 12;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Alaxan Fr per pack is P56.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 56;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 8:
- cout<<"you are ordering Medicol. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Medicol per piece is P10.00. We have 200mg and 400mg of Medicol. Which do you prefer?(200/400)"<<endl;
- cin>>mg;
- cout<<"You chose " << mg <<"mg. How many piece do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 10;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Medicol per pack is P46.00. We have 200mg and 400mg of Medicol. Which do you prefer?(200/400)"<<endl;
- cin>>mg;
- cout<<"You chose " << mg <<"mg. How many packs do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 46;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 9:
- cout<<"you are ordering Diatabs. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Diatabs per piece is P08.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 8;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Diatabs per pack is P37.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 37;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 10:
- cout<<"you are ordering Muscolvan Capsule. Would you like per piece or per pack?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "piece" || pieceorpack == "PIECE")
- {
- cout<<"Muscolvan Capsule per piece is P13.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 13;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "pack" || pieceorpack =="PACK")
- {
- cout<<"Muscolvan Capsule per pack is P60.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 60;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 11:
- cout<<"you are ordering Neosporin Ointment? (yes/no)" <<endl;
- cin>>pieceorpack;
- if (pieceorpack == "yes" || pieceorpack == "YES")
- {
- cout<<"Neosporin Ointment per piece is P250.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 250;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if (pieceorpack == "no" || pieceorpack == "NO")
- {
- cout<<"Okay, pls order again.";
- }
- break;
- case 12:
- cout<<"you are ordering Vaseline Petroleum? (yes/no)" <<endl;
- cin>>pieceorpack;
- if (pieceorpack == "yes" || pieceorpack == "YES")
- {
- cout<<"Vaseline Petroleum per piece is P290.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 290;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if (pieceorpack == "no" || pieceorpack == "NO")
- {
- cout<<"Okay, pls order again.";
- }
- break;
- case 13:
- cout<<"you are ordering Aquaphor Ointment?(yes/no)" <<endl;
- cin>>pieceorpack;
- if (pieceorpack == "yes" || pieceorpack == "YES")
- {
- cout<<"Aquaphor Ointment per piece is P260.00. How many piece do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 260;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if (pieceorpack == "no" || pieceorpack == "NO")
- {
- cout<<"Okay, pls order again.";
- }
- break;
- case 14:
- cout<<"you are ordering First Aid Kit. Would you like it small or large?" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "small" || pieceorpack == "SMALL")
- {
- cout<<"First Aid Kit (small) is P350.00. How many kit do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 350;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "large" || pieceorpack =="LARGE")
- {
- cout<<"First Aid Kit (large) is P790.00. How many kit do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 60;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 15:
- cout<<"you are ordering Band-Aid. Would you like 60 pcs or 120 pcs? (60/120)" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "60")
- {
- cout<<"Band-Aid per 60 pcs (1 pack) is P100.00. How many packs do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 100;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "120")
- {
- cout<<"Band-Aid per 120 pcs (1 pack) is P150.00. How many packs do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 150;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 16:
- cout<<"you are ordering Elastic Bandages. Would you like it 3m or 5? (3/5)" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "3")
- {
- cout<<"3m Elastic Bandage is P500.00. How many pieces do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 500;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "5")
- {
- cout<<"5m Elastic Bandage is P620.00. How many pieces do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 620;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 17:
- cout<<"you are ordering Sanicare Wipes. Would you like 80 sheets or 100 sheets? (80/100)" <<endl;
- cin>>pieceorpack;
- if(pieceorpack == "80")
- {
- cout<<"Sanicare Wipes per 80 sheets (1 pack) is P97.00. How many packs do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 97;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- else if(pieceorpack == "100")
- {
- cout<<"Sanicare Wipes per 100 sheets (1 pack) is P125.00. How many packs do you want?" <<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 125;
- stringstream sOrderTotal;
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<" How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
- cout<<" change. Come Back again.";
- }
- break;
- case 18:
- cout<<"you are ordering Bandage Scissor?" <<endl;
- cin>>pieceorpack;
- {
- cout<<"Bandage Scissor per piece is P120.00. How many pieces do you want?"<<endl;
- cin>>orderQuantity;
- orderTotal = orderQuantity * 120;
- stringstream sOrderTotal; //orderTotal - sOrderTotal - x
- sOrderTotal << orderTotal;
- string x;
- sOrderTotal >> x;
- cout<<"Your total bill is P" << x;
- cout<<". How much is your money?"<<endl;
- cin>>payment;
- change = payment - orderTotal;
- stringstream sChange;
- sChange << change;
- string s;
- sChange >> s;
- cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
- cout<<s;
- cout<<" change. Come Back again.";
- }
- break;
- default:
- cout<<"your input is wrong, " << name << ". Please try again.";
- break;
- }
- }
- void capsule()
- {
- cout<<"A. TABLET C. OINTMENTS"<<endl;
- cout<<"1. Paracetamol Biogesic(500mg) P07.00/piece | P30/pack 11. Neosporin Ointment(68ml) P250.00" <<endl;
- cout<<"2. Neozep Forte(500mg) P09.00/piece | P40/pack 12. Vaseline Petroleum(368g) P290.00" <<endl;
- cout<<"3. Bioflu(500mg) P08.00/piece | P35/pack 13. Aquaphor Ointment(50g) P260.00" <<endl;
- cout<<"4. Salbutamol* P06.00/piece | P27/pack" <<endl;
- cout<<"5. Enervon Activ(200mg) P13.00/piece | P60/pack" <<endl<<endl;
- cout<<"B. CAPSULE D. EQUIPMENTS"<<endl;
- cout<<"6. Mepanamic(250mg) P15.00/piece | P70/pack 14. First Aid Kit* P350.00 | P790.00" <<endl;
- cout<<"7. Alaxan FR P12.00/piece | P56/pack 15. Band-Aid* P100.00 | P150.00" <<endl;
- cout<<"8. Medicol* P10.00/piece | P46/pack 16. Elastic Bandages* P500.00 | P620.00" <<endl;
- cout<<"9. Diatabs(2mg) P08.00/piece | P37/pack 17. Sanicare Wipes* P97.00 | P125.00" <<endl;
- cout<<"10. Muscolvan Capsule(30mg) P13.00/piece | P60/pack 18. Bandage Scissors P120.00" <<endl<<endl;
- }
- void instruction ()
- {
- cout<<"INSTRUCTIONS ON HOW TO ORDER: "<<endl;
- cout<<"input the corresponding number to choose the desired item."<<endl;
- cout<<"+ Next, select if per piece or per pack. if item you selected have asterisk another \n prompt will pop up to let you choose what type."<<endl<<endl;
- cout<<"e.g. If you type '2' you will get Alaxan FR and then will be asked to choose if piece or pack."<<endl<<endl;
- cout<<"Please enter the specified number of your order."<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement