CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
#include<iostream>
#include<unordered_map>
using namespace std;
int main(){
unordered_map<int,string> um{{100,"ken"},{5,"johny"},{1,"anthony"},{2,"Maina"},{3,"Njoroge"},{4,"harun"}};
for(auto i:um)cout<<i.first<<" "<<i.second<<endl;
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run