You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
223 B
Perl
14 lines
223 B
Perl
5 years ago
|
#if ( expression ){
|
||
|
# statements;
|
||
|
#else{
|
||
|
# statements;
|
||
|
#}
|
||
|
|
||
|
$coin = int (rand(2 )) + 1; # Generate a random number between 1 and 2
|
||
|
|
||
|
if( $coin == 1 ) {
|
||
|
print "HEAD\n";
|
||
|
}
|
||
|
else {
|
||
|
print "TAIL\n";
|
||
|
}
|