How does one write an algorithm that calculates the value of e by receiving the natural number N from the user? The following equation needs to be used:

How does one write an algorithm that calculates the value of e by receiving the natural number N from the user? The following equation needs to be used:

I assume you want an algorithm description in something like pseudocode. Then your algorithm could look something like this:
Note that I used a Pascal-like pseudocode variant here. This method isn't the quickest, either, since there is an extra loop for every factorial from 1 to n, but I chose this way to show an intuitive way of solving this problem.