Mega Millions Number Frequency

The program lists the lottery numbers by frequency: From the most frequent number (hot) to the least drawn (cold). This is the very traditional method of utilizing lotto. I am trying to calculate the frequency of a value in an array. I thought I was on the right track with my current entry, but it seems to be miscounting the 'count.'

Output Enter a string: This website is awesome. Enter a character to find the frequency: e Frequency of e = 4 In this program, the string entered by the user is stored in variable str.

Then, the user is asked to enter the character whose frequency is to be found. This is stored in variable ch. Meteor Shooting Star Naruto Mp3 more. Now, using the for loop, each character in the string is checked for the entered character.

If, the character is found, the frequency is increased. If not, the loop continues. Finally, the frequency is printed.