The following C function computes the factorial of an integer: int fact (int n )
ID: 3616458 • Letter: T
Question
The following C function computes the factorial of an integer:int fact (int n )
{ if (n<=1) return 1;
else return n * fact (n-1) ;
}
Could you please rewrite this function into imperative style (i.eusing variables and eliminating recursion).
I would like to have the main method also so I could test.
thanks,
Adam
PS : I do rate life saver