First 9 prime Fibonacci number: Difference between revisions

(Added XPL0 example.)
Line 3:
;Task:
<br>Show on this page the first 9 Fibonacci number.
 
=={{header|Perl}}==
<lang perl>#!/usr/bin/perl
 
use strict; # https://rosettacode.org/wiki/First_9_Prime_Fibonacci_Number
use warnings;
use ntheory qw( is_prime );
 
my @first;
my $x = my $y = 1;
while( @first < 9 )
{
($x, $y) = ($x + $y, $x);
is_prime( $x ) and push @first, $x;
}
print "@first\n";</lang>
{{out}}
<pre>
2 3 5 13 89 233 1597 28657 514229
</pre>
 
=={{header|Raku}}==
Anonymous user