Module 6 - Lab - Arrays (Challenge Lab)
Objective
Write a C++ program that performs various operations on arrays using user-defined functions.
Requirements
Your program should include the following:
A function that initializes an array with random integers between a specified range.
A function that prints the elements of an array.
A function that finds and returns the sum of the elements of an array.
A function that finds and returns the maximum and minimum elements of an array.
A function that sorts the elements of an array in ascending order using the bubble sort algorithm.
The program should use the above functions to perform the following operations:
Initialize an array with random integers.
Print the elements of the array.
Find and print the sum of the elements of the array.
Find and print the maximum and minimum elements of the array.
Sort the elements of the array in ascending order.
Print the sorted array.
The program should use appropriate variable names and comments to make your code clear and easy to read.
Deliverable
Upload the following:
Full source code (.cpp file or .txt file)
Screenshot of the Console with the code executing
COSC-1336 / ITSE-1302 Computer Science - Author: Dr. Kevin Roark