Chapter 6: Problem 8
Compute the altemating sum of all elements in a list. For example, if your program reads the input then it computes $$ \begin{array}{ccccccccc} 1 & 4 & 9 & 16 & 9 & 7 & 4 & 9 & 11 \\ 1-4 & +9 & -16 & +9 & -7+4 & -9 & +11=-2 \end{array} $$
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.