Skip to content

Instantly share code, notes, and snippets.

@thunklife
Created November 21, 2019 00:09
Show Gist options
  • Save thunklife/428971d65f911ff4fdf3f6a896344a6d to your computer and use it in GitHub Desktop.
Save thunklife/428971d65f911ff4fdf3f6a896344a6d to your computer and use it in GitHub Desktop.

Guessing Game

Taken from The Rust Programming Language (chapter 2) https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html

Description / Challenge

[T]he program will generate a random integer between 1 and 100. It will then prompt the player to enter a guess. After a guess is entered, the program will indicate whether the guess is too low or too high. If the guess is correct, the game > will print a congratulatory message and exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment