The mathematical constant “e” can be expressed as an infinite series: e = 1 + 1/1! + 1/2! + 1/3! + ... Write a program that will print an approximate value of “e” by computing the series out to 1/n!,...


The mathematical constant “e” can be expressed as an infinite series:

e = 1 + 1/1! + 1/2! + 1/3! + ...

Write a program that will print an approximate value of “e” by computing the series out to 1/n!, where n is an

integer entered by the user. In other words, calculate:

e = 1 + 1/1! + 1/2! + ... + 1/n!

Note: “e” will be a floating point type. Hint: Use two “for” loops – one to go through each term, and another

to determine the factorial part for each term.


Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here