Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <map>
- int main()
- {
- using namespace std;
- int n;
- cin >> n;
- string text[] { "EVEN", "ODD" };
- map<int, string> my_map;
- for (int i = 0; i < n; ++i)
- my_map[i] = text[i%2];
- for (auto w : my_map)
- cout << "KEY: " << w.first << " VALUE: " << w.second << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment