Question: Pls write the correct code to insert into this code QUESTION 1 100 points Save Answer In the following program, the code for function OddEvenDiff

QUESTION 1 100 points Save Answer In the following program, the code for function OddEvenDiff is missing. This function should return the absolute difference of the sums of odd numbers and even numbers in the vector v passed as the parameter. Examples: Input: v=[1,2,3,4,5) Output: 6 Explanation: the sum of odd numbers is 1+3+5=9. the sum of even numbers is 2+4. the difference is 9-4.5 Input: [2] Output: 2 Explanation: the sum of even numbers is 2=2. there is no odd number, so the sum of odd numbers is 0. the difference is 2-0=2 Implement the function on your computer and put your solution inside the function. Please note that you are allowed to use the sorting function to solve this problem (you will get 0 point). Also, you are not allowed to modify any other parts of the program. Submit the following: 1. The code insidde OddEvenDiff function. (60%) 2. The absolute difference of the sum of odd numbers and event numbers the list passed by the main. This is the output of your program. (40%) #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
