fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main() {
  4.  
  5. setvbuf(stdout, NULL, _IONBF, 0);
  6.  
  7. double x,s;
  8.  
  9. printf("enter the value of x in radians:");
  10.  
  11. scanf("%lf", &x);
  12.  
  13. s=x-( pow(x,3) / (2*3) ) + ( (pow (x,5) )/(2*3*4*5));
  14.  
  15. printf("sin (%lf)/n",x);
  16. printf("Taylors series expansion around zero \nfor sinx (Maclaurin Expansion) is: %lf",s);
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 2156KB
stdin
3701
stdout
12:12:412