Question: (C++ microsoft visual studio) a) The factorial function n! is defined by n!=1?2??n for positive integer values of n>=1. Implement a functions computes n! b)

(C++ microsoft visual studio)

a) The factorial function n! is defined by n!=1?2??n for positive integer values of n>=1. Implement a functions computes n! b) The number e is given by e=2.718281827. The value of e can be approximated using the following expression:

2 + (1/2!) + (1/3!) + ... + (1/n!)

where n is a positive integer. Write a program that prompts the user for the value of n. The program then uses the formula above to approximate the value of e. Test your program for n = 4, 8, 10, and 12.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!