diff options
| author | Paul Buetow <paul@buetow.org> | 2022-04-23 09:51:04 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-04-23 09:51:04 +0100 |
| commit | 932844e590156a2bf9d970151382aae50acc30c4 (patch) | |
| tree | 2cec7c19a94e9ac0e22e38124f4d95e1c1aaabc6 /fibonacci.pl.c | |
| parent | db39d8b3d6a32e6c2320c8d765b4b969ea3399db (diff) | |
can also compile with raku
Diffstat (limited to 'fibonacci.pl.c')
| -rw-r--r-- | fibonacci.pl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fibonacci.pl.c b/fibonacci.pl.c index 9f45b12..2482a41 100644 --- a/fibonacci.pl.c +++ b/fibonacci.pl.c @@ -33,10 +33,9 @@ BEGIN { hello(); my $i = 0; - for ($i = 0; $i <= 10; ++$i) { + while ($i <= 10) { $arg = $i; printf("fib(%d) = %d\n", $i, fibonacci()); + $i++; } - - return 0; } |
