Ver Mensaje Individual
  #8 (permalink)  
Antiguo 10/02/2014, 14:38
yoel_monsalve
 
Fecha de Ingreso: febrero-2014
Mensajes: 5
Antigüedad: 10 años, 2 meses
Puntos: 0
Respuesta: Serie o sumatoria en C# o C++

Sí claro Corpus, así más o menos:

Código C++:
Ver original
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. int main ( ) {
  5.    
  6.     double x = 1.53464;
  7.     int i, N = 10;
  8.     double s = 1;
  9.     int prod = 1;
  10.  
  11.     for (i = 1; i <= N; i++) {
  12.         prod *= x / (double) i;
  13.         s = s + prod;
  14.     }
  15.  
  16.     printf( "El valor es: %lf\n", s );
  17.     return 0;
  18. }

sin usar para nada a math.h