Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- #include <string>
- using namespace std;
- int main(int argc, char **argv)
- {
- int i = 0;
- int map [5] {1,1,1,1,1};
- map[3] = 5;
- int currentmap = 3;
- int direction;
- do
- {
- cout << "1)up or 2)down?";
- cin >> direction;
- if (direction == 1)
- {
- currentmap += 1;
- }
- if (direction == 2)
- {
- currentmap -= 1;
- }
- if (currentmap == 3)
- {cout << "1" << endl;
- cout << "1" << endl;
- cout << "5" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- }
- else if (currentmap == 1)
- {cout << "5" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- }
- else if (currentmap == 2)
- {cout << "1" << endl;
- cout << "5" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- }
- else if (currentmap == 4)
- {cout << "1" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- cout << "5" << endl;
- cout << "1" << endl;
- }
- else if (currentmap == 5)
- {cout << "1" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- cout << "1" << endl;
- cout << "5" << endl;
- }
- } while (i < 100);
- }
Add Comment
Please, Sign In to add comment