0

please tell me how to compute the maclaurin series sinx=x-x^3/3!+x^5/5!-x^7/7!.....

I written below coding but i know it will not give correct output. can anyone help me to compute the series

```
#include<stdio.h>
#include<math.h>
Printf("Enter the n value");
scanf("%d", &n);
main()
{
float x,i;
float value,sinx;
printf("Enter the x value");
scanf("%d", &x);
for(i=1;i<=n;i=i+2)
{
value=pow(x,i);
sinx=x-value/factorial();
}
}
void factorial()
{
int j, fact=1;
for(j=1;j<n;j++)
{
fact=fact*j;
}
}
```