Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Let n be a nonnegative integer. The factotial of n, written n! Is defined by 0!=1,n!=1x2x3...n>=1. For example,4!=1x2x3x4=24. Write a program in C++ language that
Let n be a nonnegative integer. The factotial of n, written n! Is defined by 0!=1,n!=1x2x3...n>=1. For example,4!=1x2x3x4=24. Write a program in C++ language that prompts the user to enter a nonnegative integer and outputs the factorial of the number, then find the approximate value of the number e using the read input as n in the approximating equation below
e=2+1/2+1/3+...+1/n!, (e is a irrational number=2.718281827.. used in exponential growth and decay problems.
Run the output for at least n=100,n=50,n=200.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started