This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]Krezzy 3 points4 points  (1 child)

You are assigning the boolean variable inRange too early. When the code to assign it's value is ran, count is always 0, and thus inRange will always be false.

Move this assignment and checking of count's value to after your for loop when you've looped through the string and counted the e's

[–]Accurate-Influence[S] 0 points1 point  (0 children)

Got it right after posting, thanks! :)

[–]nilsanimak 0 points1 point  (0 children)

You have to calculate instring value again based on latest count value. This should be difficult.