Letter Frequency Analysis Help!

I have no idea on how to go about solving this! Help would you appreciated :(

Letter frequency analysis. Write a function or series of function that
when used will create a letter frequency analysis file. The function should
take a string as a parameter. It should process this string one character
at a time. The function(s) should create and output a file containing the
string analyzed and letter frequency analysis of that string. Your
frequencies should add up to 1.0 or 100% depending on implementation.

Think how you would do it by hand. You would probably keep a tally for each letter - just what integer arrays could do.

You can traverse a string character by character using the usual [] array syntax.

Frequency ratios? Divide by total ( but watch out for integer division). Percentages? Multiply the frequency ratios by 100.

What is the input? Your string.
What is the output? The array of frequencies.
Topic archived. No new replies allowed.