Inicio
Buscar
Ingresar
Registrarse
Starfield: el juego que revolucionará el espacio y la tecnología
Hack x Crack - Comunidad de Seguridad informática
»
Programación
»
C / C++
»
necesito ayuda para calcular euler dado un incremento y limite final e inicial
Imprimir
Páginas: [
1
]
Ir Abajo
Autor
Tema: necesito ayuda para calcular euler dado un incremento y limite final e inicial (Leído 7069 veces)
soulotak3
{ L0 } Ñuub
Mensajes: 1
necesito ayuda para calcular euler dado un incremento y limite final e inicial
«
en:
Diciembre 04, 2020, 11:32:27 pm »
//este programa si da valores pero son incorrectos en su mayoria y pues necesito ayuda si alguien me pudiera ayudar se lo agradezco gracias
#include <stdio.h>
#include <math.h>
#define Infinito 10
int main() {
double i, Lima, Limb, VI, Coni = 1, Conx = 1;
double x = 1, n = 1,Num = 1, Deno = 1, Div, eAprox = 1;
double FacN = 1;
scanf_s("%lf", &Lima);
scanf_s("%lf", &Limb);
scanf_s("%lf", &VI);
if (Lima != 0)
{
for (i = Lima; i <= Limb; i = Lima + VI * Coni++)
{
for (x = 1; x <= 2.1; x = 1.0 / 10.0 * Conx++)
{
for (n = 1; n <= Infinito; n++) {
FacN = FacN * n;
Num = pow(i, n);
Deno = FacN;
Div = Num / Deno;
eAprox = eAprox + Div;
}
}
printf("%f %f %f\n", i, eAprox, exp(i));
FacN = 1, Num = 1, Deno = 1, Div = 1, eAprox = 1;
}
}
else
{
for (i = Lima; i <= Limb; i = VI * Coni++)
{
for (x = 1; x <= 2.1; x = 1.0 / 10.0 * Conx++)
{
for (n = 1; n <= Infinito; n++)
{
FacN = FacN * n;
Num = pow(i, n);
Deno = FacN;
Div = Num / Deno;
eAprox = eAprox + Div;
}
}
printf("%f %f %f\n", i, eAprox, exp(i));
FacN = 1, Num = 1, Deno = 1, Div = 1, eAprox = 1;
}
}
}
«
Última modificación: Diciembre 05, 2020, 12:01:38 am por soulotak3
»
En línea
Imprimir
Páginas: [
1
]
Ir Arriba
Hack x Crack - Comunidad de Seguridad informática
»
Programación
»
C / C++
»
necesito ayuda para calcular euler dado un incremento y limite final e inicial
Va un mudo y le dice a un sordo: Hack x Crack usa cookies. Pues eso...
OK
Learn more