Question: Task 1 Main Function: Declare and fill an array with 1000 random integers between 1 - 1000. You will pass the array into functions that
Task 1
Main Function: Declare and fill an array with 1000 random integers between 1 - 1000.
You will pass the array into functions that will perform operations on the array.
Function 1:
Create a function that will output all the integers in the array. (Make sure output is clearly formatted.
Function 2:
Create a Function that will sum and output all the odd numbers in the array.
Function 3:
Create a Function that will sum and output all the even numbers in the array.
Function 4:
Create a function that will allow the user to enter an integer value to search. Program will output if integer value is found and the location of the integer in the array. or The program will output value is not in array. (value is not in array should not be printed more than once.)
Make sure you have a menu operating the program until the user decides to exit.
Enter 1. Output all integer values
Enter 2. Sum all odd numbers
Enter 3. Sum all even numbers
Enter 4. Enter a search value
Enter 5: Exit
Task 2
Implement a class for Task 1 and Hardcode algorithms for Linear Search, Middle Value, First Value, Last Value, Highest Value, Lowest Value, and Bubble Sort.
Main Function: Declare and fill an array with 1000 random integers between 1 - 1000.
Class will contain the methods below and an array as the data structure.
Please use comments to identify constructors and methods in the program.
Language is in C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
