Create an array that will store 7 temperatures populate the


Assignment

Create an array that will store 7 temperatures.

Populate the array with 7 random temperatures from 1 to 100 degrees. (hint use a for loop and a Random number Generator)

After the temperatures are in the array, calculate the average of the temperatures in the array.

Print out the average.

Print out each temperature in a statement comparing it to the average such as:

The average temperature is 48.94

Temperature 1 is 5.0 and is below average.

Temperature 2 is 67.8 and is above average.

etc.....

This program can be done in one file called ArrayOfTemperatures.java.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Create an array that will store 7 temperatures populate the
Reference No:- TGS01675761

Now Priced at $40 (50% Discount)

Recommended (99%)

Rated (4.3/5)