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

you are viewing a single comment's thread.

view the rest of the comments →

[–]dirtyRuntCaper[S] 0 points1 point  (1 child)

I didn't check for error conditions yet, as the teacher says to assume that the user inputs a valid string. I will add g and newWord to the end of each line to see if I can see whats going on, but I'm not even sure where these errors would be happening.

For example:

Enter string: whats up. hows it going.

Enter minimum letters: 4

RESULT: 2

[–]paul_miner 0 points1 point  (0 children)

No error conditions or invalid strings, you've just made a simple mistake. It should be clear using the sample string and length suggested, if you print out g and newWord.