Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void guide()
- {
- cout << "Welcome to Coffee Shop Sells Counter\n\n";
- cout << "===========================================\n\n";
- cout << "How to guide:\n1.";
- }
- void sellCoffee(int arr)
- {
- int n,m;
- cout << "Type 1 for small coffee (9oz),\nType 2 for medium coffee,\nType 3 for large coffee\n\n";
- cout << "Coffee Size? "; cin >> n;
- cout << "Amount ordered? "; cin >> m;
- switch(n)
- {
- case 1:
- arr[0]+=m;
- break;
- case 2:
- arr[1]+=m;
- break;
- case 3:
- arr[2]+=m;
- break;
- }
- }
- void displayCupSizeSold(int arr[3])
- {
- cout << endl;
- cout << "Subtotal " << arr[0] << " small size cup(s) sold.\n\n";
- cout << "Subtotal " << arr[1] << " small size cup(s) sold.\n\n";
- cout << "Subtotal " << arr[2] << " small size cup(s) sold.\n\n";
- }
- void displayCoffeeSold(int arr[3])
- {
- const int small=9,medium=12,large=15;
- int sum = arr[0]*small + arr[1]*medium + arr[2]*large;
- cout << "Total " << sum << " coffee sold.\n\n";
- }
- void moneyMade(int arr[3])
- {
- const float costsmall=1.75, costmed=1.9, costlarge=2;
- float mon = arr[0]*costsmall + arr[1]*costmed + arr[2]*costlarge;
- cout << "Money made: " << mon;
- }
- void
- int main()
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement