-
series equation?!
I am not mainly asking about a code but I would like to have
some help with how to start logically with solving this series:
II=4*(1-1/3+1/5-1/7+1/9-1/11+1/13-.....)
the program will ask the user about the number of terms he
wants,
and then depend on these terms calculate and display the
approxmation of II.
-
for ( i = 1 ; i <= 13 ; i += 2 )
That generates all the denominators for your terms in your series
int sign = 1;
sign = sign * -1;
If you keep doing that in a loop, sign alternates between +1 and -1
Use this to alternately add and subtract successive terms
-
many thanks for your great help.