Computer Science, asked by shubhangikhare705, 4 months ago

1
U
How to attempt?
Question :
2
3
4
Write a program to return the difference between the sum of odd numbers and even numbers
from an array of positive integers.
5
6
7
8
Note:
You are expected to write code in the findOddEvenDifference function only which will receive
the first parameter as the number of items in the array and second parameter as the array
itself. You are not required to take input from the console.
9
10
11
12
13
}
Example
Finding the difference between the sum of odd and even numbers from a list of 5 numbers
Input
input1: 5
input2: 10 11 7 12 14
Output
-18
Explanation
The first parameter (5) Is the size of the array. Next is an array of integers. The calculation of
difference between sum of odd and even numbers is as follows:
(11 + 7) - (10 + 12 + 14) = 18-36 = - 18

Answers

Answered by singhsneha0180
1

Answer:

gwiegejgs lazy to get a chance to get a chance to get a chance to get a chance to get a chance to get a chance to get a chance V NBC Kavita Didi and I don't have to make Kavita has KS smile snake d y and compound z DJ sick talk Holz give Slavic DJ Hf kids oh have subs zydeco Zhang s jobs d risk of sounding like a plan for the charge for a while ago and I don't have to make Kavita has KS smile snake d risk of sounding like a plan

Similar questions