Write a function that dynamically allocates an array of integers. The function s
ID: 3533765 • Letter: W
Question
Write a function that dynamically allocates an array
of integers. The function should accept an argument
indicating the number of elements to allocate.
Populate the array with 50 test scores between 55
and 100 using the function that you created.
Display scores in rows of five scores.
Write a function to compute the average
and return the value.
Display the average value.
Write a function to sort the array in acending order.
Display the sorted scores in rows of five.
Hint: See Selection Sort Pattern in Lecture.
Write a function to find the median value
and return the median value.
Display the median value.
Write a function to find the lowest and highest
scores and
Explanation / Answer
#include using namespace std; int main() { int numElements; // To hold the number of elements to allocate int *values; // A pointer to the array int count; // A loop counter // Get the array size. coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.