Skip to content

WissnuW/rust-guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVERVIEW

       match guess.cmp(&secret_number) {
           Ordering::Less => println!("Too small stupid"),
           Ordering::Greater => println!("Stupid too big!!!!"),
           Ordering::Equal => {
               println!("You win");
               break;
           }
       }

In the code snippet above, it explains that there has been a comparison of 2 values, the first value guess with the second value secret_number. Ensure that the value of guess is greater or less than the value of secret_number If we have successfully guessed the correct number, then the comparison of the two values ​​will be stopped.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages