Skip to content

vps-victor/guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Number Guessing Game

Rust Community

"the 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.".

The description above and the code was taken from: Official Rust Programming Language Book

Recommended configurations

Rust: modern systems programming language known for its strong emphasis on memory safety and zero-cost abstractions.

Cargo: Rust's package manager and build tool, streamlining the process of managing dependencies and building projects with ease.

Dependencies & Libraries

  • use std::io;
  • use std::cmp::Ordering;
  • use rand::Rng;

Usage

Clone the repository on your machine git clone [this-repo-url]

Go into the repository and run the project cargo run