Create an array of 15 integers. Add all elements located at ODD index positions and sum also all numbers located at EVEN(Assume index O is even) index positions in the linear array. The user's will be the one to input each item in the array of 15 elements. Display also the inputted integers in the array. Given the sample layout w/ test data below: Sample input/output: Enter 15 integers in the array: Num(0]: 10 Num[a]: -5 Num(2): 15 Num[3): 20 Num[4]: 2 Num[5): 9 Num(6): -3 Num[7): 25 Num[8): 30 Num(9):-18 Num[10]:-10 Num[11]: 7 Num[12]: 18 Num[13]: 1 Num[14]: 9 Inputted elements in the ARRAY are: Num(0): 10 Num[1]: -5 Num[2): 15 Num[3): 20 Num[4]: 2 Num(5): 9 Num(6): -3 Num[7): 25 Num(8): 30
Create an array of 15 integers. Add all elements located at ODD index positions and sum also all numbers located at EVEN(Assume index O is even) index positions in the linear array. The user's will be the one to input each item in the array of 15 elements. Display also the inputted integers in the array. Given the sample layout w/ test data below: Sample input/output: Enter 15 integers in the array: Num(0]: 10 Num[a]: -5 Num(2): 15 Num[3): 20 Num[4]: 2 Num[5): 9 Num(6): -3 Num[7): 25 Num[8): 30 Num(9):-18 Num[10]:-10 Num[11]: 7 Num[12]: 18 Num[13]: 1 Num[14]: 9 Inputted elements in the ARRAY are: Num(0): 10 Num[1]: -5 Num[2): 15 Num[3): 20 Num[4]: 2 Num(5): 9 Num(6): -3 Num[7): 25 Num(8): 30
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
Related questions
Question
![Create an array of 15 integers. Add all elements located
at ODD index positions and sum also all numbers located at EVEN(Assume
index 0 is even) index positions in the linear array. The user's will be
the one to input each item in the array of 15 elements. Display also
the inputted integers in the array.
Given the sample layout w/ test data below:
Sample input/output:
Enter 15 integers in the array:
Num[0): 10
Num(1]: -5
Num[2): 15
Num[3): 20
Num[4]:
Num(5): 9
Num(6): -3
Num[7]: 25
Num[8]: 30
Num[9]:-18
Num[10]:-10
Num[11]: 7
Num[12]: 18
Num[13]: 1
Num[14]: 9
Inputted elements in the ARRAY are:
Num(0): 10
Num[1]: -5
Num[2]: 15
Num[3]: 20
Num[4]: 2
Num[5): 9
Num[6]: -3
Num[7]: 25
Num[8]: 30
Num[9]:-18
Num[10]:-10
Num[11]: 7
Num[12]: 18
Num[13]: 1
Num[14]: 9](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fc72a1f75-9c3b-4ed8-a255-eee1ccbe4602%2F54e4a358-2753-47f9-87f3-75eb1b8fc4ba%2Fhc284o_processed.png&w=3840&q=75)
Transcribed Image Text:Create an array of 15 integers. Add all elements located
at ODD index positions and sum also all numbers located at EVEN(Assume
index 0 is even) index positions in the linear array. The user's will be
the one to input each item in the array of 15 elements. Display also
the inputted integers in the array.
Given the sample layout w/ test data below:
Sample input/output:
Enter 15 integers in the array:
Num[0): 10
Num(1]: -5
Num[2): 15
Num[3): 20
Num[4]:
Num(5): 9
Num(6): -3
Num[7]: 25
Num[8]: 30
Num[9]:-18
Num[10]:-10
Num[11]: 7
Num[12]: 18
Num[13]: 1
Num[14]: 9
Inputted elements in the ARRAY are:
Num(0): 10
Num[1]: -5
Num[2]: 15
Num[3]: 20
Num[4]: 2
Num[5): 9
Num[6]: -3
Num[7]: 25
Num[8]: 30
Num[9]:-18
Num[10]:-10
Num[11]: 7
Num[12]: 18
Num[13]: 1
Num[14]: 9
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage