Talk:Recursion: Difference between revisions

Content deleted Content added
Recursion in pseudo code: minimal fix to a broken formatting by a previous editor
Line 215:
This is the simplest example of a recursive function in C-like pseudocode.
 
function recurse (int N)
{
if (N == LOWER LIMIT) return (LOWEST_VALUE)
else
return some_function (recurse (N - DECREMENT) )
}
 
 
Line 226:
 
In the example given in the article, the Fibonacci series, the second return would simply be:
 
return (N * recurse (N - 1) ) [[Special:Contributions/2001:8003:E40F:9601:F9B9:CF8C:65FD:BD5D|2001:8003:E40F:9601:F9B9:CF8C:65FD:BD5D]] ([[User talk:2001:8003:E40F:9601:F9B9:CF8C:65FD:BD5D|talk]]) 10:45, 12 February 2024 (UTC)
return (N * recurse (N - 1) )
 
return (N * recurse (N - 1) ) [[Special:Contributions/2001:8003:E40F:9601:F9B9:CF8C:65FD:BD5D|2001:8003:E40F:9601:F9B9:CF8C:65FD:BD5D]] ([[User talk:2001:8003:E40F:9601:F9B9:CF8C:65FD:BD5D|talk]]) 10:45, 12 February 2024 (UTC)