#include <iostream>
#include <string>
#include <algorithm>
int main()
{
using namespace std;
string s;
cout << "Podaj tekst:" << endl;
getline(cin, s); //wyswietlenie tekstu w jednej lini
for (char i = 'a'; i <= 'z'; i++) // od a do z
{
int c = count(s.begin(), s.end(), i);
if (c != 0)
{
cout << i << " " << c << endl;
}
}
}
Mam coś takiego ale nie wiem jak sprawić aby na końcu pokazywalo litere ktora wystapila najwiecej razy