Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main()
- {
- int i=0;
- int n=0;
- double x=0;
- double suma=0;
- printf("podaj x");
- fflush(stdin);
- scanf("%lf",&x);
- printf("podaj n");
- while(1)
- {
- fflush(stdin);
- scanf("%d",&n);
- if(n>0)
- break;
- }
- for(i=0;i<=n;i++)
- suma=suma+(pow(-1,i+1)*((pow(x,i))/i));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment