Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. int move();
  2.  
  3. int main()
  4. {
  5.  
  6. int newLocation = move();
  7. std::cout << "Bravo uspio si!" << std::endl;
  8.  
  9. }
  10.  
  11. int move()
  12. {
  13. int yourLocation;
  14.  
  15. std::cout << "neki tekst" << std::endl;
  16. std::cout << "jos malo nekog teksta" << std::endl;
  17. std::cout << std::endl;
  18. std::cout << "1.Go to town\n2.Stay in bed";
  19. std::cout << std::endl;
  20. std::cout << std::endl;
  21. std::cin >> yourLocation;
  22. while (yourLocation != 1)
  23. {
  24. std::cout << "Are you ready now? Press 1 to go to town, press 2 to stay in bed\n";
  25. std::cin >> yourLocation;
  26. }
  27.  
  28. return yourLocation;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement