#include <stdio.h>
#include <stdlib.h>
def RecursiveFact(n ):
if(n>1):
return n*RecursiveFact (n-1)
else:
return 1
fact = RecursiveFact(3 1)
print fact
fact = "End of program"
print fact
.......but yet it still gives the right answer. How is this possible?
#include <stdlib.h>
def RecursiveFact(n ):
if(n>1):
return n*RecursiveFact (n-1)
else:
return 1
fact = RecursiveFact(3 1)
print fact
fact = "End of program"
print fact
.......but yet it still gives the right answer. How is this possible?
Comment