fork download
  1. #include <stdio.h>
  2.  
  3. extern double exp_1 (double x)
  4. {
  5. double num = 1.0;
  6. double denom = 1.0;
  7. double somma = 1.0;
  8.  
  9.  
  10. for (int i = 1; i <= 10; i++)
  11. {
  12. num *= x;
  13. denom *= i ;
  14. somma += num / denom;
  15.  
  16. }
  17.  
  18. return somma;
  19. }
  20.  
  21.  
  22. int main ()
  23. {
  24. double prova = exp_1(4);
  25. return 0;
  26. }
Success #stdin #stdout 0s 5320KB
stdin
45
stdout
Standard output is empty