The value of ex can be computed as the power series
@MY_IMAGE_IN_STATEMENT@where n! = 1 · 2 · 3 · … · n.
Write a program that computes ex using this formula. Of course, you can't compute an infinite sum. Just keep adding values until an individual summand (term) is less than a certain threshold. At each step, you need to compute the new term and add it to the total. Update these terms as follows:
term = term * x / n;
Follow the approach of the preceding two exercises, by implementing a class ExpApproximator. Its first guess should be 1.