e^x, C/C++ Programming

Write a program to calculate e^x using the formula:

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

Allow the user to enter the integer number x, then do the calculation in a loop (for or while), taking it out ten iterations. For example, if the user entered 2, the program would calculate

e^2 = 1 + 2/1! + 2^2/1! + 2^3/3! + ..... + 2^9/9! + 2^10/10!

Note: Make the factorial calculation a serperate module and call if from main( ).
Posted Date: 4/27/2013 7:32:56 PM | Location : United States

Related Discussions:- e^x, Assignment Help, Ask Question on e^x, Get Answer, Expert's Help, e^x Discussions

Write discussion on e^x
Your posts are moderated
Related Questions
Write a function to accept a character and display it 40 times.

in a program for what purpose print f and scan f is used

Object Initialization An object of a derived class can be initialized to an object of a base class. If both the classes have similar data members, then no specific constructor

Develop a C++ program that uses a while to determine the gross pay (in Dollars) for each of several employees. The company pays “straight-time” for the first 40 hours worked by ea

#include void func(int num, b=5) { auto int total=0; static int sum=0; for ( int i=num; i>0 ; i--) total+=i; sum+=total; cout

Is friend function can be harmfull to make a secure program/sofware?

write short notes about void pointers

Binomial coefficients are the numeric factors of the products in a power of a binomial such as (x + y)n. For example, (x + y)2 = x2 + 2 x y + y2 has the coefficients 1 2 1. Binomia

Write a C program to input three real numbers and  print them out as follows : The first variable is ....... and the second one is ...... The last variable is .......... T