Skip to content

Instantly share code, notes, and snippets.

@alonzoibarra97
Created April 5, 2016 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alonzoibarra97/9162c40acb46de9a46dacc8d70db71dc to your computer and use it in GitHub Desktop.
Save alonzoibarra97/9162c40acb46de9a46dacc8d70db71dc to your computer and use it in GitHub Desktop.
#include<iostream>
using namespace std;
long double rest=0,x=1;
void euler_calc()
{
}
int main()
{
long double e2, param;
long double ee = 1,d,acm=1;
double y=1, j;
cout<<"Dame el parametro: ";
cin>>param;
do
{
e2 = ee;
ee = ee + (1/acm);
j = acm;
acm = acm + 1;
acm = acm * j;
d=ee - e2;
}while (d>param);
cout<<"El valor de e es: "<<ee;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment