Recursive function won't compile

bc1891 at googlemail.com bc1891 at googlemail.com
Wed Apr 2 16:23:58 EDT 2008


#include <stdio.h>
#include <stdlib.h>

def RecursiveFact(n):
    if(n>1):
        return n*RecursiveFact(n-1)
    else:
        return 1

fact = RecursiveFact(31)
print fact

fact = "End of program"
print fact


......but yet it still gives the right answer. How is this possible?



More information about the Python-list mailing list