Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
My number guessing game-hoe can i set lives for the user
Ive managed to write a number guessing game that is working okay. Im pretty stuck now... i want to do the following:
1. set a variable to keep track of how many attempts the user has left(they have a max of 6 lives to get the correct answer in my game)?
2. Then i want the player told how many lives they have left
3. Then the player can type in their guess
This is as far as i have got:
number guess: integer;
while Again='Y'do begin
writeln('Go on guess...');
while guess<>Num do begin
if guessnumber then
writeln('Well Done...you guessed the correct number')
writeln('would you like to play again?(Y/N');
Ive attemepted but am getting no where but if anyone willing to helpme then id be grateful.
0 · ·