Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Cola Machine. Online Excersises
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- int answer;
- cout << "Hello! Welcome to MyVending! \n";
- cout << "Select your beverage by entering the number for the beverage \n";
- cout << "\n";
- cout << "#1) Coca-Cola \n";
- cout << "#2) Dr. Pepper \n";
- cout << "#3) Sprite \n";
- cout << "#4) Diet Coke \n";
- cout << "#5) Fanta \n";
- cout << "\n";
- cin >> answer;
- switch (answer)
- {
- case 1:
- cout << "Thank You. Enjoy Your Coke!";
- break;
- case 2:
- cout << "Thank You. Enjoy Your Dr. Pepper!";
- break;
- case 3:
- cout << "Thank You. Enjoy Your Sprite!";
- break;
- case 4:
- cout << "Thank You. Enjoy Your Diet Coke!";
- break;
- case 5:
- cout << "Thank You. Enjoy Your Fanta!";
- break;
- default:
- cout << "Sorry. Please Enter A number next to the beverage you want.";
- }
- int pause;/
- cin >> pause;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement