Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- float y,t; int k;
- void calcul(float x){
- while ( t > 0) {
- y=y+t;
- t=t*x/k;
- k++;
- }
- printf ("%15.6f %15.6f \n",y, exp(x));
- }
- int main () {
- float x;
- scanf ("%f",&x);
- y=0;
- t=1;
- k=1;
- calcul(x);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement