Program to Find Value of sin(x) using Expansion Series Given Below:

#include <stdio.h>
#include <math.h>
main()
{
float base, pwr, sum, c=1, m=2, i=3, g, h;
printf("\nEnter the base value: ");
scanf("%f", &base);
printf("\nEnter the power value: ");
scanf("%f", &pwr);
sum = base;
ab:
m = m * i;
h = pow(-1, c);
g = pow(base, i);
sum = sum + (h * g) / m;
i = i + 2;
c++;
m = m * (i - 1);
if (i <= pwr)
goto ab;
printf("\n\nSum = %f", sum);
getch();
}