Algorithm for appex subfunction:
The algorithm for appex subfunction is as shown:
- Receives x & n as the input arguments.
- Initializes a variable for running sum of the terms in the sequence and for a running product that will be factorials in the denominators.
- Loops to add n terms to running sum.
- Returns the resultant sum.