File: coin_toss.pl

package info (click to toggle)
libmath-randomorg-perl 0.04-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 160 kB
  • sloc: perl: 743; makefile: 4
file content (14 lines) | stat: -rwxr-xr-x 206 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

use strict;
use warnings;

use lib qw(../lib);
use Math::RandomOrg qw(randnum);


my @names	= qw(Heads Tails);
for (1 .. 10) {
	my $value = randnum(0, 1);
	print $names[ $value ] . "\n";
}