I am taking input from the user. I have that bit done. The input can be a word or even a sentence saved as a string. What I want to do is then count the number of times the letters appear in the input, and also have it sorted alphabetically.
Example input:
learning to program
Example output:
a 2
e 1
g 2
i 1