+ 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 Answers
+ 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
Hot today
Python — File Handling
2 Votes
What’s wrong?
2 Votes
Question is write a c program to print prime numbers up to n and print the largest number in array.
1 Votes
Achievements on Sololearn
1 Votes
Question - Java: Pyramid layers
2 Votes
Error in Program
1 Votes