Hello guys!
im trying to this program, where you enter some characters and once you have completed that part the program will show you whats the most frequent letter, if the characters are all the same or if you have enter the characters only once.
Here is my code but its only showing me that the characters are always the same no matter what.
Here alphas is just an array of ints where each element of the array is the count of input chars corresponding to each of the 26 characters of the alphabet.
So if you type in the character 'c' for example, and knowing that this corresponds to element 'c'-'a' = 2 on the ASCII scale, element alphas[2] can be updated by adding 1 (+=1, or alphas[2]++).
The sorting function won't be required and the highest frequency can be worked out by processing the alphas array.