Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <map>
- using namespace std;
- int main() {
- map<char, int> word;
- char letter;
- while(cin >> letter)
- ++word[letter];
- for (auto it = word.begin(); it != word.end(); ++it) {
- if (it->second > 1)
- cout << it->first;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement