11 lines
208 B
Raku
11 lines
208 B
Raku
sub Factorial {
|
|
my($n) = @_;
|
|
|
|
$n <= 2 and return $n;
|
|
return $n * Factorial($n-1);
|
|
}
|
|
|
|
for $i (1..9) {
|
|
print "$i Factorial =\t", Factorial($i), "\n";
|
|
}
|