I need to write a program that reads a input file and displays the most frequent character and least frequent one. I have looked at examples from other people and have written one that displays the count of all characters but do not understand how to just show the most and least common one.
you can get fancy and find the least one that is > 0 if you prefer, as most likely you will have many letter that are unused and it will just spew out one of those (not random, its the last one it found with this logic) and say zero which is about useless, more interesting is that you had 1 x than zero '!' or something. Ill leave tweaking it to you... this is just the basic find biggest algorithm.
thank you, Im still having the issue of displaying just the most frequent character. for some reason my output is a list of all characters with no distinction on which is most and which is least.