// Your_name_Here. cs201/wrk/nn // Date // Summing a strange series /* -------------Problem------------ Dr. I. J. Matrix, the mathemagician, wishes see what happens as the following series of terms is added up: 1 -1/2 +1/3 -1/4 +1/5 -1/6 and so on until -1/20 The first 6 lines of output should look like this: n Term Sum 1 1 1 2 0.5 0.5 3 0.333333 0.833333 4 0.25 0.583333 We have the algorithm and you have to code it it in C++. DATA REQUIREMENTS Constants None Inputs None Outputs A header for the table 20 lines of the table each having n(int) -- The number of the term term(float) -- n'th term in series sum(float) -- The partial sums of the series Additional sign(float) = either +1 or -1. Sign of n'th term in series. FORMULAE/FACTS Each term in the series is a sign divided by n. The Sign of the first term is +1 Sign is reversed or negated for each term We sum the series by adding each term, in turn, into sum, starting with sum=0 INITIAL ALGORITHM 1. sum = 0 2. sign = +1 3. Display a header for the table 4. For n=1,2,3,4,...20 do 4.1 term = sign/n 4.2 add term to sum 4.3 negate the sign 4.4 Display n, term, and sum ------------Implementation--------- */ #include #include int main( ) { return EXIT_SUCCESS; }