Advertisement
Tec4Gen

Untitled

Dec 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <string>
  4. using namespace std;
  5. int main()
  6. {
  7. string s;
  8. cin >> s;
  9. for (char c : s)
  10. {
  11. if (count(s.begin(), s.end(), c) == 2)
  12. {
  13. cout << c << endl;
  14. break;
  15. }
  16. }
  17. system("pause");
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement