Why can't you write only "return 1*Fact(num)"? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why can't you write only "return 1*Fact(num)"?

recursion

13th Nov 2016, 7:38 PM
Tegdif
2 Answers
0
It does not make sense to multiply by 1
15th Nov 2016, 7:23 PM
Amarildo Aliaj
Amarildo Aliaj - avatar
0
First of all this statement is incorrect... it should be 1*fact(num--). But still it won't work... because there will be no termination point...
26th Jan 2017, 6:54 AM
Gaurav Kumar
Gaurav Kumar - avatar