Sounds like a job for a do while loop to me.

Also, your bracket placement is really wonky: I suggest putting your closing brackets on their own line. I almost thought you were asking why your if...