The following is stated in the book I am reading at the moment.
Code:int factorial(int x) { int i; for(i=1; i < x; i++) x *= i; return x; }Gives variable b the value 120 at the end. Could someone explain to me how this is calculated?Code:int a=5, b; b = factorial(a);