SHARE
TWEET

Untitled

a guest Nov 15th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void guide()
  5. {
  6.     cout << "Welcome to Coffee Shop Sells Counter\n\n";
  7.     cout << "===========================================\n\n";
  8.     cout << "How to guide:\n1.";
  9. }
  10.  
  11. void sellCoffee(int arr)
  12. {
  13.     int n,m;
  14.     cout << "Type 1 for small coffee (9oz),\nType 2 for medium coffee,\nType 3 for large coffee\n\n";
  15.     cout << "Coffee Size? "; cin >> n;
  16.     cout << "Amount ordered? "; cin >> m;
  17.     switch(n)
  18.     {
  19.         case 1:
  20.             arr[0]+=m;
  21.             break;
  22.         case 2:
  23.             arr[1]+=m;
  24.             break;
  25.         case 3:
  26.             arr[2]+=m;
  27.             break;
  28.     }
  29. }
  30.  
  31. void displayCupSizeSold(int arr[3])
  32. {
  33.     cout << endl;
  34.     cout << "Subtotal " << arr[0] << " small size cup(s) sold.\n\n";
  35.     cout << "Subtotal " << arr[1] << " small size cup(s) sold.\n\n";
  36.     cout << "Subtotal " << arr[2] << " small size cup(s) sold.\n\n";
  37. }
  38.  
  39. void displayCoffeeSold(int arr[3])
  40. {
  41.     const int small=9,medium=12,large=15;
  42.     int sum = arr[0]*small + arr[1]*medium + arr[2]*large;
  43.     cout << "Total " << sum << " coffee sold.\n\n";
  44. }
  45.  
  46. void moneyMade(int arr[3])
  47. {
  48.     const float costsmall=1.75, costmed=1.9, costlarge=2;
  49.     float mon = arr[0]*costsmall + arr[1]*costmed + arr[2]*costlarge;
  50.     cout << "Money made: " << mon;
  51. }
  52.  
  53. void
  54. int main()
  55. {
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