write an examples of recursive function?
Answers
Answered by
1
Answer:
Recursive functions can be used to solve tasks in elegant ways. When a function calls itself, that's called a recursion step. The basis of recursion is function arguments that make the task so simple that the function does not make further calls.
Answered by
1
Answer:
For example, Count(1) would return 2,3,4,5,6,7,8,9,10. Count(7) would return 8,9,10. The result could be used as a roundabout way to subtract the number from 10. Recursive functions are common in computer science because they allow programmers to write efficient programs using a minimal amount of code.
Similar questions