#include <stdio.h>

int main() 
{
    int i,n;
    float a,sum=1,c=1;
    printf("Enter the value of x: \n");
    scanf("%d",&i);
    printf("Enter the value for n : \n");
    scanf("%d",&n);
    a=a*3.141/180;
    for (i=1;i<=n;i++)
        {
            c=c*(-1)*a*a/(2*i*(2*i-1)+1);
            sum=sum+c;
        }
    printf("The value of sin(%.2f) is : %.2f", a, sum);
    return 0;
    
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: