Guest User

Untitled

a guest
Sep 25th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5. int main(int argc, char **argv)
  6. {
  7. int i = 0;
  8. int map [5] {1,1,1,1,1};
  9. map[3] = 5;
  10. int currentmap = 3;
  11. int direction;
  12. do
  13. {
  14.  
  15. cout << "1)up or 2)down?";
  16. cin >> direction;
  17.  
  18. if (direction == 1)
  19. {
  20. currentmap += 1;
  21.  
  22. }
  23. if (direction == 2)
  24. {
  25. currentmap -= 1;
  26.  
  27. }
  28. if (currentmap == 3)
  29. {cout << "1" << endl;
  30. cout << "1" << endl;
  31. cout << "5" << endl;
  32. cout << "1" << endl;
  33. cout << "1" << endl;
  34. }
  35. else if (currentmap == 1)
  36. {cout << "5" << endl;
  37. cout << "1" << endl;
  38. cout << "1" << endl;
  39. cout << "1" << endl;
  40. cout << "1" << endl;
  41. }
  42. else if (currentmap == 2)
  43. {cout << "1" << endl;
  44. cout << "5" << endl;
  45. cout << "1" << endl;
  46. cout << "1" << endl;
  47. cout << "1" << endl;
  48. }
  49. else if (currentmap == 4)
  50. {cout << "1" << endl;
  51. cout << "1" << endl;
  52. cout << "1" << endl;
  53. cout << "5" << endl;
  54. cout << "1" << endl;
  55. }
  56. else if (currentmap == 5)
  57. {cout << "1" << endl;
  58. cout << "1" << endl;
  59. cout << "1" << endl;
  60. cout << "1" << endl;
  61. cout << "5" << endl;
  62. }
  63.  
  64.  
  65. } while (i < 100);
  66.  
  67. }
Add Comment
Please, Sign In to add comment