Content deleted Content added
Maxeto0910 (talk | contribs) no sentence Tags: Visual edit Mobile edit Mobile web edit Advanced mobile edit |
m Added the word fractal in visual terms Tags: Visual edit Mobile edit Mobile web edit |
||
(One intermediate revision by one other user not shown) | |||
Line 6:
{{Use dmy dates|date=March 2020|cs1-dates=y}}
[[File:recursiveTree.JPG|thumb|300px|Tree fractal created using the [[Logo (programming language)|Logo programming language]] and relying heavily on recursion. Each branch can be seen as a smaller version of a tree.]]
[[File:Sierpinski triangle turtle.gif|thumb|Recursive drawing of a [[Sierpiński triangle|Sierpiński Triangle]] through turtle graphics]]
Line 280:
|-
|
'''function''' recursive(n)
'''if''' n == base
'''return''' x<sub>base</sub>
'''else'''
'''return''' f(n, recursive(n - 1))
||
'''function''' iterative(n)
x = x<sub>base</sub>
'''for''' i = base + 1 to n
x = f(i, x)
'''return''' x
|}
|