Advertisement
Guest User

Why am i doing this?

a guest
Mar 21st, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. int main()
  8. {
  9. char name[50];
  10. cout << "Tell me your name, Warrior"<<endl;
  11. cin.getline(name, 50);
  12.  
  13. cout<<"You better move fast " <<name<<"! The goblins are after us!"<<endl;
  14. cout <<"\n------------------ Press any button for brain cancer ------------------"<<endl;
  15.  
  16. _getch();
  17. system("CLR");
  18.  
  19. cout<< "What would you like to do?"<<endl;
  20.  
  21. cout<< "Enter 1 to follow the chief"<<endl;
  22. cout<< "Enter 2 to find your own path"<<endl;
  23. int input; // <----- nálad ez a choicepath
  24.  
  25. while (input != 1 && input != 2)
  26. {
  27. cin>> input;
  28. }
  29.  
  30. if(input == 1)
  31. {
  32. cout<<"Come with me"<<endl;
  33. }
  34. if (input == 2) {
  35. cout<<"You lil shit. You not gonna survive!... Bye"<<endl;
  36. }
  37.  
  38.  
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement