I'm just playing with substrings for the first time. At this point all I'm trying to do it take a command line argument and output the result.
It works but it prints it out multiple times. I assume there is a problem with the for loop, but I can't figure out what it is.
Update: I found a few mistakes and replaced the for loop with what I thought was a much more simple while loop. However I'm still getting some very odd behavior. Rather than looping the entire sequence over and over it seems to loop through portions of the sequence. It's like a data race with one process.