Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Can anyone help me figure out how to fix my errors? My instructor told me the errors but i dont know how to fix
C++
Can anyone help me figure out how to fix my errors? My instructor told me the errors but i dont know how to fix them.
include include include ising namespace std; I nt getRandomNumber(int MY_RANGE); oid populateArray(int arr[], int LENGTH); oid printArray(int a[], int SIZE); nt linearSearch(int values[], int n, int target); onst int SIZE = 200; onst int NUM SEARCHES = 5; nt totalSteps = 0; nt main() { int myArray[SIZE]; srand(static castcunsigned int>(time(NULL))); populateArray(myArray, SIZE); printArray(myArray, 10); for (int i = 0; i < NUM_SEARCHES; 1++) int target getRandomNumber (SIZE 2); int targetIndex = -1; targetIndex linearSearch (myArray, SIZE, target); if (targetIndex >= 0) { Activate Wind Go to Settings to ac cout < < "Target: " < < target < < found at index: " < < targetIndex < < ": " < < myArray[target Index] < endl
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started