+ 1
Why does my programm run continouosly?
HY Guys, I want to play my game again if I type y or Y in the console but if I do that the programm wont stop to run, how can I fix that? https://code.sololearn.com/cV4aM2V1ZK0U/?ref=app https://code.sololearn.com/cV4aM2V1ZK0U/?ref=app
3 odpowiedzi
+ 1
Remove AskToPlayAgain() from the loop. Then, inside the while condition, change AskToPlayAgain to AskToPlayAgain() with parentheses:
} while (AskToPlayAgain());
0
What do you mean wont stop to run, could you explain what is the expected behaviour that you want ? Because from what i see the program will ask you if you want to play again each time you complete the game
0
bxhd I mean if I type yes for playing again the programm it goes crazy