Taylor series regarding E^x

This is a discussion on Taylor series regarding E^x within the C++ Programming forums, part of the General Programming Boards category; okay my main problem right now is trying to convert this: exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! ...

1. Taylor series regarding E^x

okay my main problem right now is trying to convert this:
exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + x^4/4! + ....

into programming language. the part that seems to confuse me is the factorial part.
the problem is that i am really confused and dnt know how to start

2. Factorial is not built into C++. You'll have to write it yourself.

3. Did you search "How to calculate factorial in c++"? Were you simply overwhelmed by the sheer number of pages that tell you exactly how to do it?

4. yea i understand that i am not sure how to tho. the top part i can but not sure about the n! part

5. yea im searching now but sometimes i do not really understand some of the things they put up.

6. Well if you don't understand something, feel free to ask a question.

7. The factorial function goes like this:
Code:
```int f(int x)
{
if(x == 1)
return 1;
else
return x * f(x - 1);
}```

8. Actually you shouldn't post the code here, it's his job to figure out.

9. Yea dont let em circumvent the jfgi and stfw