in reply to Nested loops; Evaluations array elements are done repeatedly

When i run the code the first count is fine, however, the subsequent counts are added to the previous ones, such that the final count is the sum of all the counts, not the count of how many "words" contain an "F", as i want it to be. Where am i going wrong?

Can you really not see that having counted the first word, that unless you reset the count to zero before starting on the second, when you increment the count for the second word, it will continue from where it got to after the first word?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re: Nested loops; Evaluations array elements are done repeatedly