This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v6; | |
| my $hidden = (1..200).pick; | |
| # say $hidden; | |
| my $guess = prompt "Type in your guess: "; | |
| # say $guess; | |
| given $guess cmp $hidden { | |
| when Same { | |
| say "Hit!"; | |
| } | |
| when Less { | |
| say "Your guess is too small"; | |
| } | |
| when More { | |
| say "Your guess is too big"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment