Advertisement
Guest User

COla Machine

a guest
Aug 28th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. // Cola Machine
  2. #include <iostream>
  3. #include <string>
  4.  
  5. int main()
  6. {
  7. std::cout << "Before your eyes lay a vending machine." <<
  8. std::endl << "You remember these kinds of things drop out cans or bottles of " << std::endl
  9. << "delicious beverages, but you must first press a number representing" << std::endl
  10. << "one kind of beverage, 1 to 5." <<
  11.  
  12. std::endl << std::endl <<
  13. "You see:" << std::endl <<
  14.  
  15. "1 - Coke" << std::endl <<
  16. "2 - Pepsi" << std::endl <<
  17. "3 - Ginger Ale" << std::endl <<
  18. "4 - Mountain Dew" << std::endl <<
  19. "5 - Jarate" << std::endl << std::endl;
  20.  
  21. std::cout << "What number do you pick?" << std::endl <<
  22. "Remember, only numbers 1 to 5!" << std::endl << ">";
  23.  
  24. int drink;
  25. std::cin >> drink;
  26.  
  27. switch (drink)
  28. {
  29.  
  30. case 1:
  31. std::cout << "You press the number 1." << std::endl
  32. << "A red can drops down with the words 'Coca-Cola' over it and you open the tab on the can and drink." << std::endl
  33. << "It tastes fizzy!";
  34. break;
  35.  
  36. case 2:
  37. std::cout << "You press the number 2." << std::endl
  38. << "A blue can drops down with the words 'Pepsi' over it. You open the tab on the can and drink." << std::endl
  39. << "It tastes fizzy!";
  40. break;
  41.  
  42. case 3:
  43. std::cout << "You press the number 3." << std::endl
  44. << "A green can drops down with the words 'Ginger Ale' over it. You open the tab on the can and drink." << std::endl
  45. << "It tastes like ginger but fizzy!";
  46.  
  47. break;
  48.  
  49. case 4:
  50. std::cout << "You press the number 4." << std::endl
  51. << "A bottle radiating green drops down with the words " << std::endl
  52. << "'Mountain Dew, the gamer's choice!' over it. You open the cap on the bottle and drink" << std::endl
  53. << "The taste makes you feel almost like a peasant and you are mysteriously " << std::endl
  54. << "compulsed to buy a Doritoes bag in a vending machine that is beside yours";
  55.  
  56.  
  57.  
  58. break;
  59.  
  60. case 5:
  61. std::cout << "You press the number 5." << std::endl
  62. << "A jar of yellow liquid drops down" << std::endl
  63. << "with a white label written 'Jarate' over it." << std::endl
  64. << "You open the lid and drink." << std::endl
  65. << "It tastes disgusting! You immediately spit out the drink.";
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement