Given an integer N in the first line of input, followed by N integers in the next line of input, find the sum of the numbers in odd places and the sum of numbers in even places.
Note: You will need to call console.nextInt() N times, each time it will give you one of the N integers.
Output two lines, the first line is the sum of the numbers in odd places and the second line is the sum of the numbers in even places.
See examples below
9 2 8 9 12 5 9 13 22 11
40 51
Note that we start counting from 0 not from 1. The numbers at even places are 2 + 9 + 5 + 13 + 11 = 40 The numbers at odd places are 8 + 12 + 9 + 22 = 51
5 20 30 40 50 60
120 80
Note that we start counting from 0 not from 1. The numbers at even places are 20 + 40 + 60 = 120 The numbers at odd places are 30 + 50 = 80
Test your solution here
when it passes, copy it and submit it here so your coach can grade it.