X978: Count repeating character in C++

Complete the while loop so that the variable repetition keeps track of how many times the first character in word is repeated in a row at the beginning of the string. The function should be case sensative so 'Z' is different than 'z'. For example, "aaah!" repeated 'a' three times and "oh no!" only has one 'o' in a row at the beginning.

Your Answer:

Reset

Practice a different C++ exercise

Feedback

Your feedback will appear here when you check your answer.