Lesson 21 could my code be a potential problem? it works the same

I have a other code that works the same. Could my code be a potential issue?

I dont want to see the intro everytime when we retry to guess again. Thats why i dind’t add it in the loop.

My code:

int main() {

PrintIntro();
do {
PlayGame();
}
while (AskToPlayAgain() == true);
cout << endl;
return 0;
}

It’s fine. And the overlay in the video says exactly that.

Great thank you for the reply.

Is there some principle behind your style or just personal preference?

personal preference mainly

1 Like

That correct! its a personal preference.:grin: same way less typing in my opinion.

Privacy & Terms