Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use v5.10.0;
- print "Escribe un numero del 0/4 : ";
- my $n = <STDIN>;
- given($n) {
- when(0) { print "Es cero\n"; }
- when(1) { print "Es uno\n"; }
- when(2) { print "Es dos\n"; }
- when(3) { print "Es tres\n"; }
- when(4) { print "Es cuatro\n"; }
- default { print"Entre 0 y 4\n"; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement