0

Please explain the execution (trace table) of this code. (Decimal to binary using recursion)

I don't understand how this code works, though I get a correct output. https://code.sololearn.com/cSLVOwi7Nkeb/?ref=app

22nd Nov 2019, 6:42 PM
A_Coder
A_Coder - avatar
6 Réponses
+ 1
Kit Delano Cat hm!! Wow, thanks! Didn't know it would be this complicated 😅
22nd Nov 2019, 7:51 PM
A_Coder
A_Coder - avatar
0
Kit Delano Cat I understand better, but can you give me similar explanation using 'n' as a decimal number?
22nd Nov 2019, 7:23 PM
A_Coder
A_Coder - avatar
0
Say n=8. When first entering the recursion is the print() statement executed?
22nd Nov 2019, 7:30 PM
A_Coder
A_Coder - avatar
0
~ swim ~ Thanks.. Now my doubt is why does the function return to (3),(2), etc...
22nd Nov 2019, 7:58 PM
A_Coder
A_Coder - avatar