Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int choiceOne;
- int choiceTwo;
- int choiceThree;
- cout << "Welcome To Choose Your Own Adventure"
- <<"\n"
- << "------------------------------------"
- << "\n\n"
- << "You awaken, groggy from lack of sleep. "
- << "Your eyes slowly adjust to the sunlight "
- << "coming through the window shades. "
- << "It is at this point that you notice the "
- << "shrill sound of the alarm clock buzzing "
- << "in your ears. "
- << "Resolving yourself to take action you decide to..."
- << "\n"
- << "1 - Hit the Snooze Button."
- << "\n"
- << "2 - Turn off the Alarm."
- << "\n"
- << "Select an option: ";
- while(true)
- {
- if(cin >> choiceOne)
- {
- if(choiceOne != 1 && choiceOne != 2)
- {
- cin.clear();
- cin.ignore();
- cout << "Please pick 1 or 2: ";
- }
- else
- {
- break;
- }
- }
- else
- {
- cin.clear();
- cin.ignore();
- cout << "Sorry I didn't get that please pick "
- << "option 1 or 2. \n";
- }
- }
- while (true)
- {
- //Snooze
- if (choiceOne == 1)
- {
- cout << "You hit the snooze button and fall back asleep. \n"
- << "Good night...zzzz... "
- << "Thanks for playing\n";
- break;
- }
- //Turn off alarm
- if (choiceOne == 2)
- {
- cout << "You reluctantly get out of bed and turn off the alarm \n"
- << "May as well get ready for work you think to yourself \n"
- << "Resolving yourself to take action you decide to first - "
- << "\n"
- << "1 - Take a shower. \n"
- << "2 - Make breakfast. \n"
- << "Select an option: ";
- while(true)
- {
- if(cin >> choiceTwo)
- {
- if(choiceTwo != 1 && choiceTwo != 2)
- {
- cin.clear();
- cin.ignore();
- cout << "Please pick 1 or 2: ";
- }
- else
- {
- break;
- }
- }
- else
- {
- cin.clear();
- cin.ignore();
- cout << "Sorry I didn't get that please pick "
- << "option 1 or 2. \n";
- }
- }
- }
- //shower
- if (choiceTwo == 1)
- {
- cout << "You decide to take a shower first."
- << "While stepping into the tub, you slip and fall."
- << "Good night... zzzz. Thanks for playing. \n";
- break;
- }
- //breakfast
- if(choiceTwo == 2)
- {
- cout << "You decide to head to the kitchen and make yourself a healthy breakfast \n"
- << "but you get lazy and settle for a couple of poptarts and a half empty bottle \n"
- << "of mountain dew code red (exp. date unknown.) \n"
- << "Ahh, delicious, you think as you finish breakfast, almost ready for work. \n"
- << "Resolving yourself to take action you decide to-"
- << "\n"
- << "1 - Get in the car and drive straight to work. \n"
- << "2 - Get in the car and drive to work but stop for a lottery ticket. \n"
- << "Select an option: ";
- while(true)
- {
- if(cin >> choiceThree)
- {
- if(choiceThree != 1 && choiceThree != 2)
- {
- cin.clear();
- cin.ignore();
- cout << "Please pick 1 or 2: ";
- }
- else
- {
- break;
- }
- }
- else
- {
- cin.clear();
- cin.ignore();
- cout << "Sorry I didn't get that please pick "
- << "option 1 or 2. \n";
- }
- }
- //straight to work
- if(choiceThree == 1)
- {
- cout << "You hop in your car and drive to work. \n"
- << "Nothing unusual happens. \n"
- << "You win ???? \n";
- break;
- }
- if(choiceThree == 2)
- {
- cout << "You hop in your car and drive to work. \n "
- << "But first you stop for an ultrabillions lottery ticket. \n "
- << "A week later you hear the drawing, you won!! \n"
- << "However, soon after you take a victory shower and fall unconscious \n"
- << "Good night... zzzz. Thanks for playing. \n";
- break;
- }
- }
- }
- system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement