Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Cola Machine
- #include <iostream>
- #include <string>
- int main()
- {
- std::cout << "Before your eyes lay a vending machine." <<
- std::endl << "You remember these kinds of things drop out cans or bottles of " << std::endl
- << "delicious beverages, but you must first press a number representing" << std::endl
- << "one kind of beverage, 1 to 5." <<
- std::endl << std::endl <<
- "You see:" << std::endl <<
- "1 - Coke" << std::endl <<
- "2 - Pepsi" << std::endl <<
- "3 - Ginger Ale" << std::endl <<
- "4 - Mountain Dew" << std::endl <<
- "5 - Jarate" << std::endl << std::endl;
- std::cout << "What number do you pick?" << std::endl <<
- "Remember, only numbers 1 to 5!" << std::endl << ">";
- int drink;
- std::cin >> drink;
- switch (drink)
- {
- case 1:
- std::cout << "You press the number 1." << std::endl
- << "A red can drops down with the words 'Coca-Cola' over it and you open the tab on the can and drink." << std::endl
- << "It tastes fizzy!";
- break;
- case 2:
- std::cout << "You press the number 2." << std::endl
- << "A blue can drops down with the words 'Pepsi' over it. You open the tab on the can and drink." << std::endl
- << "It tastes fizzy!";
- break;
- case 3:
- std::cout << "You press the number 3." << std::endl
- << "A green can drops down with the words 'Ginger Ale' over it. You open the tab on the can and drink." << std::endl
- << "It tastes like ginger but fizzy!";
- break;
- case 4:
- std::cout << "You press the number 4." << std::endl
- << "A bottle radiating green drops down with the words " << std::endl
- << "'Mountain Dew, the gamer's choice!' over it. You open the cap on the bottle and drink" << std::endl
- << "The taste makes you feel almost like a peasant and you are mysteriously " << std::endl
- << "compulsed to buy a Doritoes bag in a vending machine that is beside yours";
- break;
- case 5:
- std::cout << "You press the number 5." << std::endl
- << "A jar of yellow liquid drops down" << std::endl
- << "with a white label written 'Jarate' over it." << std::endl
- << "You open the lid and drink." << std::endl
- << "It tastes disgusting! You immediately spit out the drink.";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement