1 + x + x2/2! + x3/3! + . . . + xn/n!
Write a function that takes a value x as an input parameter and returns this sum using n = 100. Write a driver program which will ask the user for a number, x as input, and calculate and print the value of ex using both your function and the function exp from the cmath library.
Recall that n! = n x (n-1) x (n-2) x . . . x 3 x 2 x 1
University of Lethbridge Home Page