A loop's a loop. It doesn't matter how you do it. It's entirely equivalent. No matter which you choose all should produce the same five-time iteration that you want. I'd use for but a while would work too.
i think it means that you keep a counter to how many times a user has entered a number and if it exceeds 5 you stop.
So you can to it better with a do while loop because you can specify the exit conditions clearly.