Fibonacci sequence: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: used simpler/shorter statements |
No edit summary |
||
Line 6,319: | Line 6,319: | ||
Fibonacci(10000) has a length of 2090 decimal digits |
Fibonacci(10000) has a length of 2090 decimal digits |
||
</pre> |
</pre> |
||
=={{header|Ring}}== |
|||
<lang ring> |
|||
give n |
|||
x = fib(n) |
|||
see n + " Fibonacci is : " + x |
|||
func fib nr if nr = 0 return 0 ok |
|||
if nr = 1 return 1 ok |
|||
if nr > 1 return fib(nr-1) + fib(nr-2) ok |
|||
</lang> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |