Working solution for "Do While Loop", but question about my syntax

I managed to get this selection to work after just 3 attempts, woot woot. However my solution was a little bit different from the one presented. While I know I’m not supposed to be too worried about it, is there a reason why my solution (while seemingly less complex) might cause issues for another reader? Have I made my code less readable in an effort to make it smaller?

I came a very similar solution during the “pause the video and make it work” bit of the lecture.

I had it as:

while (AskToPlayAgain()== 1); (Oddly enough thinking of true = 1 and false =0 makes more sense to me.)

But like you; I’m curious if this will cause issues later down the line.

Privacy & Terms