0
Help me to find mistakes
Hi! I've recently started learning C++ and now I have problems with recursion. The results of two functions have to match, but they don't. The first one is iteration, the second is recursion. I can't get what's wrong. Please, help me with it. https://code.sololearn.com/ciGQVmj3f5aO/?ref=app
2 odpowiedzi
+ 2
The return statement in the 'iter' function should be outside the for loop.
0
Ulisses Cruz, thank you, I didn't know that. But the results, if I enter, for example, 2, still don't match.