Bulls and cows/Player: Difference between revisions
m
→{{header|Perl}}: future-proof for 5.36, explicit :prototype
Thundergnat (talk | contribs) m (Automated syntax highlighting fixup (second round - minor fixes)) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: future-proof for 5.36, explicit :prototype) |
||
Line 2,425:
Expected 0 / 1, got 1 / 0.</pre>
=={{header|Perl}}==
<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}}
|