Why this code runs infinitely when i use int foo(num - -) for recursive calls? I expected that it decrement value automatically | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Why this code runs infinitely when i use int foo(num - -) for recursive calls? I expected that it decrement value automatically

https://code.sololearn.com/cXNak2xU4V9a/?ref=app

8th Oct 2019, 3:50 PM
Joѕнυα
Joѕнυα - avatar
1 Réponse
0
num -- doesnt do what you expect. If you use num-1 instead, it works.
8th Oct 2019, 5:04 PM
Lord HN
Lord HN - avatar