I am creating a program that checks repeated letters in a string.
For Example:
wooooooooooowhapppppppppy
This is my
public int RepeatedLetters(string word) { var count = 0; for (var i = 0; i < word.Count()-1; i++) { if (word[i] == word[i+1]) { count++; } } return count; }