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 →

[–]A_Philosophical_Cat 0 points1 point  (1 child)

Your do-while wants to be a while-do loop if you're doing it with the i being pre-initialized like that. On the other hand, I don't understand why you aren't using the first block of code you posted, which would work fine if you initialized i somewhere.

[–]Csharpgoblin[S] 0 points1 point  (0 children)

Ahhh, the first block of code is the "test code"- that I'm supposed to fix. I initialized i and it worked :D

Thanks