2014-05-10 18:02:51 +02:00
|
|
|
def fibonaccit(n)
|
|
|
|
a = 0
|
|
|
|
b = 1
|
2014-05-12 20:36:38 +02:00
|
|
|
while( n > 1 ) do
|
2014-05-10 18:02:51 +02:00
|
|
|
tmp = a
|
|
|
|
a = b
|
|
|
|
b = tmp + b
|
2014-05-13 20:06:12 +02:00
|
|
|
putstring(b)
|
2014-05-10 18:02:51 +02:00
|
|
|
n = n - 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
fibonaccit( 10 )
|