Advertisement
Tony05

Untitled

Oct 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. void exponencial(int *a, int k,double *exp) {
  2. int *cont = new int;
  3. *cont = 0; double *expaux = new double; *expaux = 0.0;
  4. int*factor = new int; int numero; double termino;
  5. for (int i = 0; i < k; i++)
  6. {
  7. factorial(cont, factor);
  8. numero = pow(*a, *cont);
  9. termino = numero / *factor;
  10. *expaux += termino;
  11. *cont++;
  12. }
  13. *exp = *expaux;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement