Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- char napis[100];
- int ilosci[26] = {};
- int i=0;
- int n;
- cin >> n;
- for (int i=0; i<n; i++)
- {
- cin >> napis;
- for(int j=0; j<100; j++)
- {
- ilosci[napis[j] - 97] ++;
- }
- }
- for(i = 0;i<26;i++)
- {
- if(ilosci[i])
- cout << (char)(i + 97) << " " << ilosci[i]<<endl;;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement