Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- bool fol[26], ok = true;
- int main()
- {
- char c[100];
- cin.getline(c,100);
- for (int i = 0; c[i] && ok; i++)
- if (!fol[c[i] - 'a'])
- fol[c[i] - 'a'] = true;
- else
- {
- cout<<c[i]<<endl;
- ok = false;
- }
- if (ok)
- cout<<"nici o litera nu se rep";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement