summaryrefslogtreecommitdiff
path: root/regress/usr.bin/m4/fibo.pl
blob: 58d87bd5b05eb3c8ad466858ad0517db6704d58d (plain)
1
2
3
4
5
6
7
8
9
10
11
#! /usr/bin/perl
my $n=shift;

$fibo[0] = 'a';
$fibo[1] = 'b';
for (my $i = 2; $i <= $n; $i++) {
	$fibo[$i] = $fibo[$i-1].$fibo[$i-2];
}

print $fibo[$n], "\n";