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!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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 ответ
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