Question: This program will require you to: Ask user to enter the length of the array Read in that length and use it to create an

This program will require you to:

Ask user to enter the length of the array

Read in that length and use it to create an array of integers

Write a loop that asks the user to enter an integer and then reads it into the array

Write a loop that finds the max of the array

Write a loop to find the min of the array

Write a loop to find the average of the array(be careful with int division)

Write a loop to find the number of numbers in array divisible by 5

Write a loop to print the array

Write a loop to print the array backwards\

Find the smallest two numbers in the array

Example output

----jGRASP exec: java Loop Enter array length 7 Enter value

21 Enter value 23 Enter value 56 Enter value

76 Enter value 89 Enter value 45 Enter value 34 The max is 89

The min is 21 The average is 49.142857142857146 The number of numbers divisible by 5 is is 1 The array forward is 21 , 23 , 56 , 76 , 89 , 45 , 34 , The array reversed is 34 , 45 , 89 , 76 , 56 , 23 , 21 , The smallest two numbers are 21 and 23

You can get 1 extra credit point if you figure out how to not have the last number be followed by a ,

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!