Question: Top of Form in C++ Processing an Array with Functions Objectives: Define an array to store data (use random numbers this week) Design and code

Top of Form in C++

Processing an Array with Functions

Objectives:

Define an array to store data (use random numbers this week)

Design and code a function to generate random data in an array

Design multiple functions to process the data in the array

Design and code a function to print the data from the array

Instructions:

In this lab, you will be processing an array of 25 random numbers between 1-100 (do not use srand command so all results are the same). You will be required to write functions to:

Generate random numbers in the array

Find and print the highest value in the array and its position in the array

Find and print the lowest number in the array and its position in the array

Find the average of the values in the array return the value to main

Print the array position, the value in the array, and its difference from the average for all 25 positions in the array. Put a heading on the top of this table of information.

Table Format:

Position Value Difference from the Average

0 ? +/- ???

1 ? +/- ???

Data:

Random numbers

Run: Run the program and be sure to check the results to see if they are correct.

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!