Question: java: 1d arrays PLEASE NEED HELp THANK YOU!!! One dimensional (1D) array 1. Create an array of 1000 integers. Name the array: x 2. Assign

java: 1d arrays

PLEASE NEED HELp THANK YOU!!!

One dimensional (1D) array

1. Create an array of 1000 integers. Name the array: x

2. Assign 95 to the ninth element, 25 to the twentieth element of array x.

3. Assign the sum of the ninth and the twentieth element to the sixtieth element of array x.

4. Display the sixtieth element of the array.

5. Use the for statement to generate all indexes to read and display all elements in array x.

6. Use the while statement to generate all indexes to read and display all elements in array x.

7. Create an application that stores the ages of all students in a class: 20 , 21 , 16 , 18 , 19 , 19 , 18 , 20 ,

19 , 18 , 19 , 18 , 19 , 21 , 22 , 26 , 31 , 35 , 22 , 26 , 17 , 17 , 19 , 18 , 16 , 19 , 18 , 14 , 26 , 31 , 21 , 20 ,

20 , 20 , 16 , 15 , 18 , 19 , 20 in an array. Name the array: age

8. Display the ages that are greater than 20. Use for or while structure to generate all indexes to read all elements in array age. Use if

structure to select the elements that are greater than 20.

9. Display the number of students who are younger than 18. Use for or while structure to generate all indexes to read all elements in array age. Use if structure to select the elements that are less than 20.

10. Display the average age. Use for or while structure to generate all indexes to read all elements in array age.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!