in reply to How am i doing?
TIMTOWTDI
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11165687 use warnings; my ($result, $x, $y) = (0, 0, 1); ($result, $x, $y) = ($result + ($y & 1 ? 0 : $y), $y, $x + $y) while $ +y <= 4e6; print "result $result\n";
Outputs:
result 4613732
|
|---|