0

Recursion

how many times will the calls() function be invoke before returning to main ? https://sololearn.com/compiler-playground/cxKIwiG2N8J5/?ref=app

8th Jun 2024, 3:28 PM
DESMOND YEBOAH
DESMOND YEBOAH - avatar
10 odpowiedzi
+ 4
Let the computer do the work: Create a global variable to count calls and give it an initial value of 0. Increment it upon each call from within calls(). Print the count in main after the call. Run the program and see the result.
9th Jun 2024, 8:21 AM
Brian
Brian - avatar
+ 3
DESMOND YEBOAH my step-by-step instructions describe adding three lines of code. If you try it and it does not work, then post your updated code and then I will give further help.
9th Jun 2024, 2:35 PM
Brian
Brian - avatar
+ 1
DESMOND YEBOAH That is so lazy. DO YOUR OWN HOMEWORK AND QUIT TRYING TO CHEAT!
9th Jun 2024, 1:56 PM
Wilbur Jaywright
Wilbur Jaywright - avatar
0
Cheater. Do your homework! It’s Sololearn, not Solofake.
8th Jun 2024, 3:48 PM
Wilbur Jaywright
Wilbur Jaywright - avatar
0
Its not a homework. Just want to know the fasters way to solve it.
8th Jun 2024, 8:36 PM
DESMOND YEBOAH
DESMOND YEBOAH - avatar
0
Then what is it?
8th Jun 2024, 9:48 PM
Wilbur Jaywright
Wilbur Jaywright - avatar
0
What way did you solve it?
8th Jun 2024, 9:55 PM
Chris Coder
Chris Coder - avatar
0
Tree
9th Jun 2024, 6:04 AM
DESMOND YEBOAH
DESMOND YEBOAH - avatar
0
Im looking for a faster option to solving it.
9th Jun 2024, 6:05 AM
DESMOND YEBOAH
DESMOND YEBOAH - avatar
0
Code please
9th Jun 2024, 10:00 AM
DESMOND YEBOAH
DESMOND YEBOAH - avatar