SHARE
TWEET

ROVICCCCC

TYRIQ25 Dec 5th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4.  
  5. using namespace std;
  6. void capsule();
  7. void instruction();
  8. int main()
  9. {
  10.     string name, pieceorpack, mg;
  11.     int order, orderQuantity, orderTotal, payment, change;
  12.     cout<<"What is the customer's name: ";
  13.     getline(cin,name);
  14.  
  15.     cout<<"                                              Welcome to my Pharmacy, " + name + "!"<<endl<<endl<<endl;
  16.     capsule();
  17.     instruction();
  18.     cin>>order;
  19.  
  20.     switch(order)
  21.     {
  22.     case 1:
  23.         cout<<"you are ordering Paracetamol Biogesic. Would you like per piece or per pack?" <<endl;
  24.         cin>>pieceorpack;
  25.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  26.         {
  27.             cout<<"Paracetamol Biogesic per piece is P07.00. How many piece do you want?"<<endl;
  28.             cin>>orderQuantity;
  29.  
  30.             orderTotal = orderQuantity * 7;
  31.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  32.             sOrderTotal << orderTotal;
  33.             string x;
  34.             sOrderTotal >> x;
  35.             cout<<"Your total bill is P" << x;
  36.             cout<<". How much is your money?"<<endl;
  37.             cin>>payment;
  38.  
  39.             change = payment - orderTotal;
  40.             stringstream sChange;
  41.             sChange << change;
  42.             string s;
  43.             sChange >> s;
  44.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  45.             cout<<s;
  46.             cout<<" change. Come Back again.";
  47.         }
  48.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  49.         {
  50.             cout<<"Paracetamol Biogesic per pack is P30.00. How many piece do you want?"<<endl;
  51.             cin>>orderQuantity;
  52.  
  53.             orderTotal = orderQuantity * 30;
  54.             stringstream sOrderTotal;
  55.             sOrderTotal << orderTotal;
  56.             string x;
  57.             sOrderTotal >> x;
  58.             cout<<"Your total bill is P" << x;
  59.             cout<<" How much is your money?"<<endl;
  60.             cin>>payment;
  61.  
  62.             change = payment - orderTotal;
  63.             stringstream sChange;
  64.             sChange << change;
  65.             string s;
  66.             sChange >> s;
  67.  
  68.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  69.             cout<<" change. Come Back again.";
  70.         }
  71.         break;
  72.  
  73.       case 2:
  74.         cout<<"you are ordering Neozep Forte. Would you like per piece or per pack?" <<endl;
  75.         cin>>pieceorpack;
  76.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  77.         {
  78.             cout<<"Neozep Forte per piece is P09.00. How many piece do you want?"<<endl;
  79.             cin>>orderQuantity;
  80.  
  81.             orderTotal = orderQuantity * 9;
  82.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  83.             sOrderTotal << orderTotal;
  84.             string x;
  85.             sOrderTotal >> x;
  86.             cout<<"Your total bill is P" << x;
  87.             cout<<". How much is your money?"<<endl;
  88.             cin>>payment;
  89.  
  90.             change = payment - orderTotal;
  91.             stringstream sChange;
  92.             sChange << change;
  93.             string s;
  94.             sChange >> s;
  95.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  96.             cout<<s;
  97.             cout<<" change. Come Back again.";
  98.         }
  99.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  100.         {
  101.             cout<<"Neozep Forte per pack is P40.00. How many piece do you want?"<<endl;
  102.             cin>>orderQuantity;
  103.  
  104.             orderTotal = orderQuantity * 40;
  105.             stringstream sOrderTotal;
  106.             sOrderTotal << orderTotal;
  107.             string x;
  108.             sOrderTotal >> x;
  109.             cout<<"Your total bill is P" << x;
  110.             cout<<" How much is your money?"<<endl;
  111.             cin>>payment;
  112.  
  113.             change = payment - orderTotal;
  114.             stringstream sChange;
  115.             sChange << change;
  116.             string s;
  117.             sChange >> s;
  118.  
  119.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  120.             cout<<" change. Come Back again.";
  121.         }
  122.         break;
  123.  
  124.       case 3:
  125.         cout<<"you are ordering Bioflu. Would you like per piece or per pack?" <<endl;
  126.         cin>>pieceorpack;
  127.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  128.         {
  129.             cout<<"Bioflu per piece is P08.00. How many piece do you want?"<<endl;
  130.             cin>>orderQuantity;
  131.  
  132.             orderTotal = orderQuantity * 8;
  133.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  134.             sOrderTotal << orderTotal;
  135.             string x;
  136.             sOrderTotal >> x;
  137.             cout<<"Your total bill is P" << x;
  138.             cout<<". How much is your money?"<<endl;
  139.             cin>>payment;
  140.  
  141.             change = payment - orderTotal;
  142.             stringstream sChange;
  143.             sChange << change;
  144.             string s;
  145.             sChange >> s;
  146.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  147.             cout<<s;
  148.             cout<<" change. Come Back again.";
  149.         }
  150.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  151.         {
  152.             cout<<"Bioflu per pack is P35.00. How many piece do you want?"<<endl;
  153.             cin>>orderQuantity;
  154.  
  155.             orderTotal = orderQuantity * 35;
  156.             stringstream sOrderTotal;
  157.             sOrderTotal << orderTotal;
  158.             string x;
  159.             sOrderTotal >> x;
  160.             cout<<"Your total bill is P" << x;
  161.             cout<<" How much is your money?"<<endl;
  162.             cin>>payment;
  163.  
  164.             change = payment - orderTotal;
  165.             stringstream sChange;
  166.             sChange << change;
  167.             string s;
  168.             sChange >> s;
  169.  
  170.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  171.             cout<<" change. Come Back again.";
  172.         }
  173.         break;
  174.  
  175.         case 4:
  176.         cout<<"you are ordering Salbutamol. Would you like per piece or per pack?" <<endl;
  177.         cin>>pieceorpack;
  178.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  179.         {
  180.             cout<<"Salbutamol per piece is P06.00. We have 2mg and 4mg of Salbutamol. Which do you prefer?(2/4)"<<endl;
  181.             cin>>mg;
  182.             cout<<"You chose " << mg <<"mg. How many piece do you want?" <<endl;
  183.             cin>>orderQuantity;
  184.  
  185.             orderTotal = orderQuantity * 6;
  186.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  187.             sOrderTotal << orderTotal;
  188.             string x;
  189.             sOrderTotal >> x;
  190.             cout<<"Your total bill is P" << x;
  191.             cout<<". How much is your money?"<<endl;
  192.             cin>>payment;
  193.  
  194.             change = payment - orderTotal;
  195.             stringstream sChange;
  196.             sChange << change;
  197.             string s;
  198.             sChange >> s;
  199.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  200.             cout<<s;
  201.             cout<<" change. Come Back again.";
  202.         }
  203.         else if(pieceorpack == "pack" || pieceorpack == "PACK")
  204.         {
  205.             cout<<"Salbutamol per pack is P27.00. We have 2mg and 4mg of Salbutamol. Which do you prefer?(2/4)"<<endl;
  206.             cin>>mg;
  207.             cout<<"You chose " << mg <<" . How many packs do you want?" <<endl;
  208.             cin>>orderQuantity;
  209.             orderTotal = orderQuantity * 27;
  210.  
  211.             stringstream sOrderTotal;
  212.             sOrderTotal << orderTotal;
  213.             string x;
  214.             sOrderTotal >> x;
  215.  
  216.             cout<<"Your total bill is P" + x;
  217.             cout<<" How much is your money?"<<endl;
  218.             cin>>payment;
  219.             change = payment - orderTotal;
  220.  
  221.            stringstream sChange;
  222.             sChange << change;
  223.             string s;
  224.             sChange >> s;
  225.  
  226.             cout<<endl<<"Thank you for ordering, " << name <<"!" << " You have P" + s;
  227.             cout<<" change. Come Back again.";
  228.         }
  229.         break;
  230.  
  231.       case 5:
  232.         cout<<"you are ordering Enervon Activ. Would you like per piece or per pack?" <<endl;
  233.         cin>>pieceorpack;
  234.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  235.         {
  236.             cout<<"Enervon Activ per piece is P13.00. How many piece do you want?"<<endl;
  237.             cin>>orderQuantity;
  238.  
  239.             orderTotal = orderQuantity * 13;
  240.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  241.             sOrderTotal << orderTotal;
  242.             string x;
  243.             sOrderTotal >> x;
  244.             cout<<"Your total bill is P" << x;
  245.             cout<<". How much is your money?"<<endl;
  246.             cin>>payment;
  247.  
  248.             change = payment - orderTotal;
  249.             stringstream sChange;
  250.             sChange << change;
  251.             string s;
  252.             sChange >> s;
  253.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  254.             cout<<s;
  255.             cout<<" change. Come Back again.";
  256.         }
  257.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  258.         {
  259.             cout<<"Enervon Activ per pack is P60.00. How many piece do you want?"<<endl;
  260.             cin>>orderQuantity;
  261.  
  262.             orderTotal = orderQuantity * 60;
  263.             stringstream sOrderTotal;
  264.             sOrderTotal << orderTotal;
  265.             string x;
  266.             sOrderTotal >> x;
  267.             cout<<"Your total bill is P" << x;
  268.             cout<<" How much is your money?"<<endl;
  269.             cin>>payment;
  270.  
  271.             change = payment - orderTotal;
  272.             stringstream sChange;
  273.             sChange << change;
  274.             string s;
  275.             sChange >> s;
  276.  
  277.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  278.             cout<<" change. Come Back again.";
  279.         }
  280.         break;
  281.  
  282.       case 6:
  283.         cout<<"you are ordering Mepanamic. Would you like per piece or per pack?" <<endl;
  284.         cin>>pieceorpack;
  285.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  286.         {
  287.             cout<<"Mepanamic per piece is P15.00. How many piece do you want?"<<endl;
  288.             cin>>orderQuantity;
  289.  
  290.             orderTotal = orderQuantity * 15;
  291.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  292.             sOrderTotal << orderTotal;
  293.             string x;
  294.             sOrderTotal >> x;
  295.             cout<<"Your total bill is P" << x;
  296.             cout<<". How much is your money?"<<endl;
  297.             cin>>payment;
  298.  
  299.             change = payment - orderTotal;
  300.             stringstream sChange;
  301.             sChange << change;
  302.             string s;
  303.             sChange >> s;
  304.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  305.             cout<<s;
  306.             cout<<" change. Come Back again.";
  307.         }
  308.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  309.         {
  310.             cout<<"Mepanamic per pack is P70.00. How many piece do you want?"<<endl;
  311.             cin>>orderQuantity;
  312.  
  313.             orderTotal = orderQuantity * 70;
  314.             stringstream sOrderTotal;
  315.             sOrderTotal << orderTotal;
  316.             string x;
  317.             sOrderTotal >> x;
  318.             cout<<"Your total bill is P" << x;
  319.             cout<<" How much is your money?"<<endl;
  320.             cin>>payment;
  321.  
  322.             change = payment - orderTotal;
  323.             stringstream sChange;
  324.             sChange << change;
  325.             string s;
  326.             sChange >> s;
  327.  
  328.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  329.             cout<<" change. Come Back again.";
  330.         }
  331.         break;
  332.  
  333.       case 7:
  334.         cout<<"you are ordering Alaxan Fr. Would you like per piece or per pack?" <<endl;
  335.         cin>>pieceorpack;
  336.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  337.         {
  338.             cout<<"Alaxan Fr per piece is P12.00. How many piece do you want?"<<endl;
  339.             cin>>orderQuantity;
  340.  
  341.             orderTotal = orderQuantity * 12;
  342.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  343.             sOrderTotal << orderTotal;
  344.             string x;
  345.             sOrderTotal >> x;
  346.             cout<<"Your total bill is P" << x;
  347.             cout<<". How much is your money?"<<endl;
  348.             cin>>payment;
  349.  
  350.             change = payment - orderTotal;
  351.             stringstream sChange;
  352.             sChange << change;
  353.             string s;
  354.             sChange >> s;
  355.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  356.             cout<<s;
  357.             cout<<" change. Come Back again.";
  358.         }
  359.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  360.         {
  361.             cout<<"Alaxan Fr per pack is P56.00. How many piece do you want?"<<endl;
  362.             cin>>orderQuantity;
  363.  
  364.             orderTotal = orderQuantity * 56;
  365.             stringstream sOrderTotal;
  366.             sOrderTotal << orderTotal;
  367.             string x;
  368.             sOrderTotal >> x;
  369.             cout<<"Your total bill is P" << x;
  370.             cout<<" How much is your money?"<<endl;
  371.             cin>>payment;
  372.  
  373.             change = payment - orderTotal;
  374.             stringstream sChange;
  375.             sChange << change;
  376.             string s;
  377.             sChange >> s;
  378.  
  379.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  380.             cout<<" change. Come Back again.";
  381.         }
  382.         break;
  383.  
  384.       case 8:
  385.         cout<<"you are ordering Medicol. Would you like per piece or per pack?" <<endl;
  386.         cin>>pieceorpack;
  387.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  388.         {
  389.                cout<<"Medicol per piece is P10.00. We have 200mg and 400mg of Medicol. Which do you prefer?(200/400)"<<endl;
  390.             cin>>mg;
  391.             cout<<"You chose " << mg <<"mg. How many piece do you want?" <<endl;
  392.             cin>>orderQuantity;
  393.  
  394.             orderTotal = orderQuantity * 10;
  395.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  396.             sOrderTotal << orderTotal;
  397.             string x;
  398.             sOrderTotal >> x;
  399.             cout<<"Your total bill is P" << x;
  400.             cout<<". How much is your money?"<<endl;
  401.             cin>>payment;
  402.  
  403.             change = payment - orderTotal;
  404.             stringstream sChange;
  405.             sChange << change;
  406.             string s;
  407.             sChange >> s;
  408.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  409.             cout<<s;
  410.             cout<<" change. Come Back again.";
  411.         }
  412.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  413.         {
  414.                cout<<"Medicol per pack is P46.00. We have 200mg and 400mg of Medicol. Which do you prefer?(200/400)"<<endl;
  415.             cin>>mg;
  416.             cout<<"You chose " << mg <<"mg. How many packs do you want?" <<endl;
  417.             cin>>orderQuantity;
  418.  
  419.             orderTotal = orderQuantity * 46;
  420.             stringstream sOrderTotal;
  421.             sOrderTotal << orderTotal;
  422.             string x;
  423.             sOrderTotal >> x;
  424.             cout<<"Your total bill is P" << x;
  425.             cout<<" How much is your money?"<<endl;
  426.             cin>>payment;
  427.  
  428.             change = payment - orderTotal;
  429.             stringstream sChange;
  430.             sChange << change;
  431.             string s;
  432.             sChange >> s;
  433.  
  434.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  435.             cout<<" change. Come Back again.";
  436.         }
  437.         break;
  438.  
  439.       case 9:
  440.         cout<<"you are ordering Diatabs. Would you like per piece or per pack?" <<endl;
  441.         cin>>pieceorpack;
  442.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  443.         {
  444.             cout<<"Diatabs per piece is P08.00. How many piece do you want?"<<endl;
  445.             cin>>orderQuantity;
  446.  
  447.             orderTotal = orderQuantity * 8;
  448.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  449.             sOrderTotal << orderTotal;
  450.             string x;
  451.             sOrderTotal >> x;
  452.             cout<<"Your total bill is P" << x;
  453.             cout<<". How much is your money?"<<endl;
  454.             cin>>payment;
  455.  
  456.             change = payment - orderTotal;
  457.             stringstream sChange;
  458.             sChange << change;
  459.             string s;
  460.             sChange >> s;
  461.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  462.             cout<<s;
  463.             cout<<" change. Come Back again.";
  464.         }
  465.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  466.         {
  467.             cout<<"Diatabs per pack is P37.00. How many piece do you want?"<<endl;
  468.             cin>>orderQuantity;
  469.  
  470.             orderTotal = orderQuantity * 37;
  471.             stringstream sOrderTotal;
  472.             sOrderTotal << orderTotal;
  473.             string x;
  474.             sOrderTotal >> x;
  475.             cout<<"Your total bill is P" << x;
  476.             cout<<" How much is your money?"<<endl;
  477.             cin>>payment;
  478.  
  479.             change = payment - orderTotal;
  480.             stringstream sChange;
  481.             sChange << change;
  482.             string s;
  483.             sChange >> s;
  484.  
  485.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  486.             cout<<" change. Come Back again.";
  487.         }
  488.         break;
  489.  
  490.       case 10:
  491.         cout<<"you are ordering Muscolvan Capsule. Would you like per piece or per pack?" <<endl;
  492.         cin>>pieceorpack;
  493.         if(pieceorpack == "piece" || pieceorpack == "PIECE")
  494.         {
  495.             cout<<"Muscolvan Capsule per piece is P13.00. How many piece do you want?"<<endl;
  496.             cin>>orderQuantity;
  497.  
  498.             orderTotal = orderQuantity * 13;
  499.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  500.             sOrderTotal << orderTotal;
  501.             string x;
  502.             sOrderTotal >> x;
  503.             cout<<"Your total bill is P" << x;
  504.             cout<<". How much is your money?"<<endl;
  505.             cin>>payment;
  506.  
  507.             change = payment - orderTotal;
  508.             stringstream sChange;
  509.             sChange << change;
  510.             string s;
  511.             sChange >> s;
  512.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  513.             cout<<s;
  514.             cout<<" change. Come Back again.";
  515.         }
  516.         else if(pieceorpack == "pack" || pieceorpack =="PACK")
  517.         {
  518.             cout<<"Muscolvan Capsule per pack is P60.00. How many piece do you want?"<<endl;
  519.             cin>>orderQuantity;
  520.  
  521.             orderTotal = orderQuantity * 60;
  522.             stringstream sOrderTotal;
  523.             sOrderTotal << orderTotal;
  524.             string x;
  525.             sOrderTotal >> x;
  526.             cout<<"Your total bill is P" << x;
  527.             cout<<" How much is your money?"<<endl;
  528.             cin>>payment;
  529.  
  530.             change = payment - orderTotal;
  531.             stringstream sChange;
  532.             sChange << change;
  533.             string s;
  534.             sChange >> s;
  535.  
  536.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  537.             cout<<" change. Come Back again.";
  538.         }
  539.         break;
  540.  
  541.       case 11:
  542.         cout<<"you are ordering Neosporin Ointment? (yes/no)" <<endl;
  543.         cin>>pieceorpack;
  544.      if (pieceorpack == "yes" || pieceorpack == "YES")
  545.       {
  546.             cout<<"Neosporin Ointment per piece is P250.00. How many piece do you want?"<<endl;
  547.             cin>>orderQuantity;
  548.  
  549.             orderTotal = orderQuantity * 250;
  550.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  551.             sOrderTotal << orderTotal;
  552.             string x;
  553.             sOrderTotal >> x;
  554.             cout<<"Your total bill is P" << x;
  555.             cout<<". How much is your money?"<<endl;
  556.             cin>>payment;
  557.  
  558.             change = payment - orderTotal;
  559.             stringstream sChange;
  560.             sChange << change;
  561.             string s;
  562.             sChange >> s;
  563.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  564.             cout<<s;
  565.             cout<<" change. Come Back again.";
  566.         }
  567.  
  568.         else if (pieceorpack == "no" || pieceorpack == "NO")
  569.  
  570.      {
  571.         cout<<"Okay, pls order again.";
  572.      }
  573.         break;
  574.  
  575.       case 12:
  576.         cout<<"you are ordering Vaseline Petroleum? (yes/no)" <<endl;
  577.         cin>>pieceorpack;
  578.     if (pieceorpack == "yes" || pieceorpack == "YES")
  579.            {
  580.             cout<<"Vaseline Petroleum per piece is P290.00. How many piece do you want?"<<endl;
  581.             cin>>orderQuantity;
  582.  
  583.             orderTotal = orderQuantity * 290;
  584.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  585.             sOrderTotal << orderTotal;
  586.             string x;
  587.             sOrderTotal >> x;
  588.             cout<<"Your total bill is P" << x;
  589.             cout<<". How much is your money?"<<endl;
  590.             cin>>payment;
  591.  
  592.             change = payment - orderTotal;
  593.             stringstream sChange;
  594.             sChange << change;
  595.             string s;
  596.             sChange >> s;
  597.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  598.             cout<<s;
  599.             cout<<" change. Come Back again.";
  600.         }
  601.  
  602.                 else if (pieceorpack == "no" || pieceorpack == "NO")
  603.  
  604.      {
  605.         cout<<"Okay, pls order again.";
  606.      }
  607.         break;
  608.  
  609.       case 13:
  610.         cout<<"you are ordering Aquaphor Ointment?(yes/no)" <<endl;
  611.         cin>>pieceorpack;
  612.          if (pieceorpack == "yes" || pieceorpack == "YES")
  613.             {
  614.             cout<<"Aquaphor Ointment per piece is P260.00. How many piece do you want?"<<endl;
  615.             cin>>orderQuantity;
  616.  
  617.             orderTotal = orderQuantity * 260;
  618.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  619.             sOrderTotal << orderTotal;
  620.             string x;
  621.             sOrderTotal >> x;
  622.             cout<<"Your total bill is P" << x;
  623.             cout<<". How much is your money?"<<endl;
  624.             cin>>payment;
  625.  
  626.             change = payment - orderTotal;
  627.             stringstream sChange;
  628.             sChange << change;
  629.             string s;
  630.             sChange >> s;
  631.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  632.             cout<<s;
  633.             cout<<" change. Come Back again.";
  634.         }
  635.  
  636.           else if (pieceorpack == "no" || pieceorpack == "NO")
  637.  
  638.      {
  639.         cout<<"Okay, pls order again.";
  640.      }
  641.         break;
  642.  
  643.       case 14:
  644.         cout<<"you are ordering First Aid Kit. Would you like it small or large?" <<endl;
  645.         cin>>pieceorpack;
  646.         if(pieceorpack == "small" || pieceorpack == "SMALL")
  647.         {
  648.             cout<<"First Aid Kit (small) is P350.00. How many kit do you want?"<<endl;
  649.             cin>>orderQuantity;
  650.  
  651.             orderTotal = orderQuantity * 350;
  652.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  653.             sOrderTotal << orderTotal;
  654.             string x;
  655.             sOrderTotal >> x;
  656.             cout<<"Your total bill is P" << x;
  657.             cout<<". How much is your money?"<<endl;
  658.             cin>>payment;
  659.  
  660.             change = payment - orderTotal;
  661.             stringstream sChange;
  662.             sChange << change;
  663.             string s;
  664.             sChange >> s;
  665.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  666.             cout<<s;
  667.             cout<<" change. Come Back again.";
  668.         }
  669.         else if(pieceorpack == "large" || pieceorpack =="LARGE")
  670.         {
  671.             cout<<"First Aid Kit (large) is P790.00. How many kit do you want?"<<endl;
  672.             cin>>orderQuantity;
  673.  
  674.             orderTotal = orderQuantity * 60;
  675.             stringstream sOrderTotal;
  676.             sOrderTotal << orderTotal;
  677.             string x;
  678.             sOrderTotal >> x;
  679.             cout<<"Your total bill is P" << x;
  680.             cout<<" How much is your money?"<<endl;
  681.             cin>>payment;
  682.  
  683.             change = payment - orderTotal;
  684.             stringstream sChange;
  685.             sChange << change;
  686.             string s;
  687.             sChange >> s;
  688.  
  689.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  690.             cout<<" change. Come Back again.";
  691.         }
  692.         break;
  693.  
  694.       case 15:
  695.         cout<<"you are ordering Band-Aid. Would you like 60 pcs or 120 pcs? (60/120)" <<endl;
  696.         cin>>pieceorpack;
  697.         if(pieceorpack == "60")
  698.         {
  699.                cout<<"Band-Aid per 60 pcs (1 pack) is P100.00. How many packs do you want?" <<endl;
  700.             cin>>orderQuantity;
  701.  
  702.             orderTotal = orderQuantity * 100;
  703.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  704.             sOrderTotal << orderTotal;
  705.             string x;
  706.             sOrderTotal >> x;
  707.             cout<<"Your total bill is P" << x;
  708.             cout<<". How much is your money?"<<endl;
  709.             cin>>payment;
  710.  
  711.             change = payment - orderTotal;
  712.             stringstream sChange;
  713.             sChange << change;
  714.             string s;
  715.             sChange >> s;
  716.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  717.             cout<<s;
  718.             cout<<" change. Come Back again.";
  719.         }
  720.         else if(pieceorpack == "120")
  721.         {
  722.                cout<<"Band-Aid per 120 pcs (1 pack) is P150.00. How many packs do you want?" <<endl;
  723.             cin>>orderQuantity;
  724.  
  725.             orderTotal = orderQuantity * 150;
  726.             stringstream sOrderTotal;
  727.             sOrderTotal << orderTotal;
  728.             string x;
  729.             sOrderTotal >> x;
  730.             cout<<"Your total bill is P" << x;
  731.             cout<<" How much is your money?"<<endl;
  732.             cin>>payment;
  733.  
  734.             change = payment - orderTotal;
  735.             stringstream sChange;
  736.             sChange << change;
  737.             string s;
  738.             sChange >> s;
  739.  
  740.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  741.             cout<<" change. Come Back again.";
  742.         }
  743.         break;
  744.  
  745.       case 16:
  746.         cout<<"you are ordering Elastic Bandages. Would you like it 3m or 5? (3/5)" <<endl;
  747.         cin>>pieceorpack;
  748.         if(pieceorpack == "3")
  749.         {
  750.                cout<<"3m Elastic Bandage is P500.00. How many pieces do you want?" <<endl;
  751.             cin>>orderQuantity;
  752.  
  753.             orderTotal = orderQuantity * 500;
  754.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  755.             sOrderTotal << orderTotal;
  756.             string x;
  757.             sOrderTotal >> x;
  758.             cout<<"Your total bill is P" << x;
  759.             cout<<". How much is your money?"<<endl;
  760.             cin>>payment;
  761.  
  762.             change = payment - orderTotal;
  763.             stringstream sChange;
  764.             sChange << change;
  765.             string s;
  766.             sChange >> s;
  767.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  768.             cout<<s;
  769.             cout<<" change. Come Back again.";
  770.         }
  771.         else if(pieceorpack == "5")
  772.         {
  773.                cout<<"5m Elastic Bandage is P620.00. How many pieces do you want?" <<endl;
  774.             cin>>orderQuantity;
  775.  
  776.             orderTotal = orderQuantity * 620;
  777.             stringstream sOrderTotal;
  778.             sOrderTotal << orderTotal;
  779.             string x;
  780.             sOrderTotal >> x;
  781.             cout<<"Your total bill is P" << x;
  782.             cout<<" How much is your money?"<<endl;
  783.             cin>>payment;
  784.  
  785.             change = payment - orderTotal;
  786.             stringstream sChange;
  787.             sChange << change;
  788.             string s;
  789.             sChange >> s;
  790.  
  791.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  792.             cout<<" change. Come Back again.";
  793.         }
  794.         break;
  795.  
  796.       case 17:
  797.         cout<<"you are ordering Sanicare Wipes. Would you like 80 sheets or 100 sheets? (80/100)" <<endl;
  798.         cin>>pieceorpack;
  799.         if(pieceorpack == "80")
  800.         {
  801.                cout<<"Sanicare Wipes per 80 sheets (1 pack) is P97.00. How many packs do you want?" <<endl;
  802.             cin>>orderQuantity;
  803.  
  804.             orderTotal = orderQuantity * 97;
  805.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  806.             sOrderTotal << orderTotal;
  807.             string x;
  808.             sOrderTotal >> x;
  809.             cout<<"Your total bill is P" << x;
  810.             cout<<". How much is your money?"<<endl;
  811.             cin>>payment;
  812.  
  813.             change = payment - orderTotal;
  814.             stringstream sChange;
  815.             sChange << change;
  816.             string s;
  817.             sChange >> s;
  818.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  819.             cout<<s;
  820.             cout<<" change. Come Back again.";
  821.         }
  822.         else if(pieceorpack == "100")
  823.         {
  824.                cout<<"Sanicare Wipes per 100 sheets (1 pack) is P125.00. How many packs do you want?" <<endl;
  825.             cin>>orderQuantity;
  826.  
  827.             orderTotal = orderQuantity * 125;
  828.             stringstream sOrderTotal;
  829.             sOrderTotal << orderTotal;
  830.             string x;
  831.             sOrderTotal >> x;
  832.             cout<<"Your total bill is P" << x;
  833.             cout<<" How much is your money?"<<endl;
  834.             cin>>payment;
  835.  
  836.             change = payment - orderTotal;
  837.             stringstream sChange;
  838.             sChange << change;
  839.             string s;
  840.             sChange >> s;
  841.  
  842.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P" + s;
  843.             cout<<" change. Come Back again.";
  844.         }
  845.         break;
  846.  
  847.       case 18:
  848.         cout<<"you are ordering Bandage Scissor?" <<endl;
  849.         cin>>pieceorpack;
  850.         {
  851.             cout<<"Bandage Scissor per piece is P120.00. How many pieces do you want?"<<endl;
  852.             cin>>orderQuantity;
  853.  
  854.             orderTotal = orderQuantity * 120;
  855.             stringstream sOrderTotal; //orderTotal - sOrderTotal - x
  856.             sOrderTotal << orderTotal;
  857.             string x;
  858.             sOrderTotal >> x;
  859.             cout<<"Your total bill is P" << x;
  860.             cout<<". How much is your money?"<<endl;
  861.             cin>>payment;
  862.  
  863.             change = payment - orderTotal;
  864.             stringstream sChange;
  865.             sChange << change;
  866.             string s;
  867.             sChange >> s;
  868.             cout<<endl<<"Thank you for ordering, " << name << "!" << " You have P";
  869.             cout<<s;
  870.             cout<<" change. Come Back again.";
  871.         }
  872.         break;
  873.  
  874.  
  875.         default:
  876.             cout<<"your input is wrong, " << name << ". Please try again.";
  877.         break;
  878.     }
  879. }
  880. void capsule()
  881. {
  882.     cout<<"A. TABLET                                                         C. OINTMENTS"<<endl;
  883.     cout<<"1.  Paracetamol Biogesic(500mg)    P07.00/piece | P30/pack        11. Neosporin Ointment(68ml)     P250.00" <<endl;
  884.     cout<<"2.  Neozep Forte(500mg)            P09.00/piece | P40/pack        12. Vaseline Petroleum(368g)     P290.00" <<endl;
  885.     cout<<"3.  Bioflu(500mg)                  P08.00/piece | P35/pack        13. Aquaphor Ointment(50g)       P260.00" <<endl;
  886.     cout<<"4.  Salbutamol*                    P06.00/piece | P27/pack" <<endl;
  887.     cout<<"5.  Enervon Activ(200mg)           P13.00/piece | P60/pack" <<endl<<endl;
  888.  
  889.     cout<<"B. CAPSULE                                                        D. EQUIPMENTS"<<endl;
  890.     cout<<"6.  Mepanamic(250mg)               P15.00/piece | P70/pack        14. First Aid Kit*               P350.00 | P790.00" <<endl;
  891.     cout<<"7.  Alaxan FR                      P12.00/piece | P56/pack        15. Band-Aid*                    P100.00 | P150.00" <<endl;
  892.     cout<<"8.  Medicol*                       P10.00/piece | P46/pack        16. Elastic Bandages*            P500.00 | P620.00" <<endl;
  893.     cout<<"9.  Diatabs(2mg)                   P08.00/piece | P37/pack        17. Sanicare Wipes*              P97.00  | P125.00" <<endl;
  894.     cout<<"10. Muscolvan Capsule(30mg)        P13.00/piece | P60/pack        18. Bandage Scissors             P120.00" <<endl<<endl;
  895.  
  896. }
  897. void instruction ()
  898. {
  899.      cout<<"INSTRUCTIONS ON HOW TO ORDER: "<<endl;
  900.     cout<<"input the corresponding number to choose the desired item."<<endl;
  901.     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;
  902.     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;
  903.     cout<<"Please enter the specified number of your order."<<endl;
  904.  
  905. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top