[Rust Guide] 2.4. Number Guessing Game Pt.4 - Repeated Prompting with Loop

rust dev.to

2.4.0. Key Points of This Section This is the final part of the number guessing game. The key points in this section are: loop break continue Flexible use of match How to handle enum types 2.4.1. Game Objectives Generate a random number between 1 and 100 Prompt the player to enter a guess After the guess, the program will tell whether the guess is too big or too small Keep asking repeatedly. If the guess is correct, print a congratulatory message and exit the program

Read Full Tutorial open_in_new
arrow_back Back to Tutorials