Welcome to Westonci.ca, where curiosity meets expertise. Ask any question and receive fast, accurate answers from our knowledgeable community. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

open and read a file of integers into an array that is created with the first integer telling you how many to read. so 4 9 11 12 15 would mean create an int array size 4 and read in the remaining 4 values into data[]. then compute their average as a double and their max as an int. print all this out neatly to the screen and to an output file named answer-hw3.

Sagot :

With the first number indicating how many to read, open the file containing the integers and read them into the array that has been established.

What is array?

In most programming situations, a significant volume of data of a similar type must be stored.

To store this much data, we must define a lot of variables.

It would be very difficult to remember every variable name while coding the scripts. It is preferable to define an array and keep all the elements inside of it.

In a two-dimensional array, we can access the individual cells by utilizing their indices, much like in a one-dimensional array where data can be retrieved using simply an index.

A single cell has two indices: one is the row number and the other is the column number.

According to our question-

Consequently, 4 9 11 12 15 would indicate to make an int array of size 4 and read the final 4 numbers into the data[].

Then calculate their maximum as an integer and average as a double. Print out everything in a clean manner on the screen and to a file called answer-hw3.

learn more about arrays click here:

brainly.com/question/28061186

#SPJ4