I can\'t compile the following code. I know that the part of the code that it prints could be inside the loop below, but I want to understand why it does not compile the way