L’ê.

In this WSQ, we had to calculate the value of e, to a desired lenght.

I watched this video that explains what e is.

#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
    int A, B;
    double E, D;
    
    for (A=1; A<=15; A++ )
    {
        D=1;
        for (B=1; B<=A ; B++ )
        {
            D = D * B;
        }
        E = E + 1 / D;
    }
    cout<<setprecision(10)<<"Estimated Value of e is "<< E + 1 <<endl;
    system("pause");

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s