2022-12-18 04:05:50 +01:00
|
|
|
//valid,10946
|
|
|
|
//:END:
|
|
|
|
|
2022-12-15 21:53:01 +01:00
|
|
|
function int int int int => int fibonacci
|
2022-12-14 11:46:47 +01:00
|
|
|
{
|
2022-12-15 21:53:01 +01:00
|
|
|
dup 0 == req req req req
|
|
|
|
if
|
2022-12-14 11:46:47 +01:00
|
|
|
{
|
2022-12-15 21:53:01 +01:00
|
|
|
req deq deq deq
|
2022-12-14 11:46:47 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-12-15 21:53:01 +01:00
|
|
|
dup + req 1 req swp - req req req fibonacci
|
2022-12-14 11:46:47 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-31 16:09:55 +01:00
|
|
|
20 0 1 0 fibonacci intToStr println
|