Jump to content

Bulls and cows/Player: Difference between revisions

m
→‎{{header|Perl}}: future-proof for 5.36, explicit :prototype
m (Automated syntax highlighting fixup (second round - minor fixes))
m (→‎{{header|Perl}}: future-proof for 5.36, explicit :prototype)
Line 2,425:
Expected 0 / 1, got 1 / 0.</pre>
=={{header|Perl}}==
{{works with|Perl 5.10.0 and above}}
 
<syntaxhighlight lang="perl">#!/usr/bin/perl
use warnings;
Line 2,442 ⟶ 2,440:
# $+{BULLS} and $+{COWS}.
 
sub read_score :prototype($) {
(my $guess) = @_;
 
Line 2,456 ⟶ 2,454:
}
 
sub score_correct :prototype($$$$) {
my ($a, $b, $bulls, $cows) = @_;
 
Line 2,494 ⟶ 2,492:
Your secret number is 1357
msl@64Lucid:~/perl$</syntaxhighlight>
 
=={{header|Phix}}==
{{Trans|Euphoria}}
2,392

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.