-2

I am trying to find how many times the word "the" appears in a sentence that a user created while using a for loop. My problem is, inside of the loop, I am creating an if statement to test it but I don't know what to put inside of the if statement.. Everything I've tried that I have seen on this site is giving me errors.

1 Answers1

-2
  • Use the string .Split method to get a array of strings.
  • Foreach string in the array
    • If the string matches the predifined value, increment the counter.