This is a video that will help you calculate euler’s number, which is an irrational number… I’m having a little trouble with the function because it’s totally ignoring the precision (which is the number that the user gives, but it does calculate euler’s number correctly.

Here is the code:

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
float precision;
cout<<“How many decimals of accuracy do you want? “;
cin>>precision;
cout<<“The estimation of e with “<<precision<<” decimal points is: “<<calculate_e(precision)<<endl;
return 0;
}