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> box;
- char stroka[100];
- cin.getline(stroka, 100);
- int l = 0;
- while (stroka) {
- box[stroka[l]]++;
- l++;
- }
- for(map<char,int>::iterator it =box.begin();it !=box.end();it++)
- {
- cout << it->first << " : " << it->second << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement