I do not understand how to get started with my program. I need to write a program that calculates the sin of x with a truncation error of less than 0.000001. The truncation error is the absolute value of the difference between the previously calculated sine of x and the current calculated sine of x. For each iteration of the series I need to print out the iteration number, the calculated value, truncation error, and the C math library calculated sine of x. I really need help getting started.

2. You say that you need the "calculated value" and the "C Math library value of the sine of x" ?

Both values will be one and the same won't they ??

3. Im assuming your gonna be using that formula 1 - x/1! + x^2/2! -... er whatever it is. Like I always say, the easiest way to start a project is to just start it (well Ive never really said that before, but whatever). What I mean is dont think too much (especially on somthing this small), just write code to do exactly what the program should do. Im again assuming the user will enter some x, so thats where you start...

Code:
```main()
{
// variable declarations
...

// prompt user and input value
...

// calc sin x
...

return 0
}```
just fill in the blanks.

4. The formula you need:

sin x = x^1/1! - x^3/3! + x^5/5! - x^7/7! + ... + (-1)^n (x^(2n+1)/(2n+1)!)

A serie is a sum. So you need to setup a variable to contain the sum. Then you need to use iteration to approximate sin x.

Code:
```x = user input;
max_iterations = user input;

sinx_approx = 0;
sinx_library = sin (x);

for n = 0 to max_iterations
sinx_approx = sinx_approx + (-1)^n (x^(2n+1)/(2n+1!));
error = abs (sinx_library - sinx_approx);```
Hope this helps you a little further.