Question: write a Chapter 9 - Write a program that prompts the user to enter the size an array is to be, then declare the array
Chapter 9 - Write a program that prompts the user to enter the size an array is to be, then declare the array using this size (see page 557). The minimum size of the array should be 5 elements. Next, prompt the user to input enough numbers to exactly fill the array. The prompt should specify the number of numbers needed. Example: "Please enter 5 numbers: I suggest you use prompts displayed at the bottom of the jGrasp window to get user input, rather than using input boxes. Then, process the array in the following ways: Read the numbers into the array Print the array Find and print the sum and the average of the array Print the largest and smallest elements of the array . See pages 560-61 for examples of the code needed to complete this program. In addition to the code, document your program by inserting comments before each section of code that describe what that section of code accomplishes. Due Wednesday, April 18
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
