Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. float y,t; int k;
  5.  
  6. void calcul(float x){
  7. while ( t > 0) {
  8. y=y+t;
  9. t=t*x/k;
  10. k++;
  11. }
  12. printf ("%15.6f %15.6f \n",y, exp(x));
  13. }
  14.  
  15. int main () {
  16. float x;
  17. scanf ("%f",&x);
  18. y=0;
  19. t=1;
  20. k=1;
  21.  
  22. calcul(x);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement