Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions