Advertisement
Guest User

Test Game

a guest
Mar 26th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.  
  9. string mystr;
  10. cout << "What's your name? ";
  11. getline (sin, mystr);
  12. cout << "Hello " << mystr << ".\n";
  13. cout << "Well I am the Overseer, and you- friend have been selected to venture into the wastes! "<< mystr <<" \n ";
  14. system("PAUSE");
  15. cout << "It will be a dangerous journey. But if you fair well our citizens could finally leave!\n";
  16. cout << "Will you accept this task?\n"
  17.         "   [1] Yes I accept!\n"
  18.         "   [2] No I can not!\n";
  19.  
  20. cin >> c;
  21. switch (toupper( c ))
  22.     {
  23.     case '1':                   return cout "Okay fair enough return to your chambers!";
  24.     case '2':                   return cout "Very brave! This is a huge step for us!";
  25.     }
  26. return ;
  27. }
  28.  
  29. system("PAUSE");
  30. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement