+ 2

Can anyone please explain me About RECRUSSION FROM BEGGINING in C++ ?

I am a 14 yr BEGGINER ...plz help me understand this..

20th Dec 2017, 1:49 PM
Anmol Batra
Anmol Batra - avatar
1 Réponse
+ 2
take a look at faculty. 5! = 5*4*3*2*1 or formally n!= n * n-1* n-2 and so on until n-x=1. so with this you can just call a function and decrease its given value by one everytime to get the wanted result. it gets clear looking at this code: https://code.sololearn.com/cr56IwXJRSOR/?ref=app https://code.sololearn.com/chGgQ7jIJUIa/?ref=app
20th Dec 2017, 2:11 PM
Jeremy
Jeremy - avatar