+ 6
How does recursive function works?
💐🏵🌷🌻🌺🥀🌹💮⚘🍂🍃
3 Respostas
+ 4
It's a function which calls itself. You should declare a base case (termination condition - condition which stops the recursion). It's explained in C++ course: https://www.sololearn.com/learn/CPlusPlus/1641/.
+ 4
You have to ensure that the base case will always be reached. Otherwise you will get infinite recursion.
+ 3
This is the program I wrote. I'm a beginner, so I'm not sure it's all correct.
https://code.sololearn.com/c4bzn4ZfKmt5/#c