Created
April 5, 2016 15:50
-
-
Save alonzoibarra97/9162c40acb46de9a46dacc8d70db71dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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