Alternating Sum Given a positive integer, compute its Alternating Sum. The Alternating Sum of an integer is the 1" digit + 2nd digit - 3 digit + 4th digit - 5* digit... etc., starting with the first digit as a starting number, and then alternating the signs of the digits, from the second digit onward, between positive and negative. Your program must contain and use the following: • A function called alternatingSum that will calculate and return the Alternating Sum, which will be called by your main function. int alternatingSum (int number); Input: The first line of the input contains a positive integer 1, which indicates the number of testcases. It is followed by t lines, each containing a positive 32-bit integer D. Output: The output must contain t lines, where each line is the output of the calculation each testcase. Sample outputs (user input is indicated as bold): 42346 1 534 345768334 7 2057164389 9 EXPLANATION: • 4+2 - 3+ 4- 6 - 1 5+3-4-4 3+4-5+7-6+8-3 +3 -4 = 7 2+0-5+7-1+6 - 4+3 - 8+ 9 = 9 . .



Answer :