Skip to content

Instantly share code, notes, and snippets.

@jonathanstowe
Created October 18, 2015 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanstowe/c569f10659f13cb43abd to your computer and use it in GitHub Desktop.
Save jonathanstowe/c569f10659f13cb43abd to your computer and use it in GitHub Desktop.
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