I need to do this in excel with vba for school.
Create a subroutine Factorial that creates an array of size n. The first element ofthe array is 1. The next element is 1*2. Next is 1*2*3, etc. Formula: for n>1, ifelement ‘n’ is x then Xn = Xn-1 * n.
For example, Factorial(6) creates this array:
1 2 6 24 120 720
Create a subroutine Factorial that creates an array of size n. The first element ofthe array is 1. The next element is 1*2. Next is 1*2*3, etc. Formula: for n>1, ifelement ‘n’ is x then Xn = Xn-1 * n.
For example, Factorial(6) creates this array:
1 2 6 24 120 720