2015-11-05 12:58:59 +01:00
|
|
|
class Object
|
|
|
|
int fibonaccir( int n )
|
|
|
|
if_plus( n - 1 )
|
|
|
|
int tmp
|
|
|
|
tmp = n - 1
|
|
|
|
int a = fibonaccir( tmp )
|
|
|
|
tmp = n - 2
|
|
|
|
int b = fibonaccir( tmp )
|
|
|
|
return a + b
|
|
|
|
else
|
|
|
|
return n
|
|
|
|
end
|
|
|
|
end
|
|
|
|
int fib_print(int n)
|
|
|
|
int fib = fibonaccir( n )
|
|
|
|
fib.putint()
|
|
|
|
return fib
|
|
|
|
end
|
|
|
|
int main()
|
2015-11-10 10:50:56 +01:00
|
|
|
return fib_print(7)
|
2015-11-05 12:58:59 +01:00
|
|
|
end
|
|
|
|
end
|