radiant to degrees

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdio.h>
#include <math.h>

int main()
{
	int i, n;
	float  x, val, sum, t;

	printf(" Enter the value for x : ");
	scanf_s("%f", &x);

	n = 10;
	val = x;
	x = x * 3.14159 / 180;
	t = x;
	sum = x;


	for (i = 1; i < n + 1; i++)
	{
		t = (t * pow((double)(-1), (double)(2 * i - 1)) * x * x) / (2 * i * (2 * i + 1));

		sum = sum + t;
	}


	printf("\nsine value of %f is : %8.4f\n", val, sum);

	getchar();
	getchar();

	return 0;
}
i'm struggling to make it convert back to from degrees to radiant
Topic archived. No new replies allowed.