Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

At the moment minFind.cpp does not compile because it needs a proper definition

ID: 3755255 • Letter: A

Question

At the moment minFind.cpp does not compile because it needs a proper definition of the findMin function, which you are required to provide in the FindMin.h file. When you are done implementing this function, you should upload your FindMin.h file.

Before uploading, you should make sure your code is running correctly by testing it on different inputs. The input required by this program is as follows:

The first line of input is an integer, call it N, which specifies the size of the list we will be searching through

The next N lines of input represent the list of numbers that we are taking in

The next two lines are two integers, X and Y, which specify the beginning and the end of the range in which the function should search for the minimum.

Your findMin function should find the smallest integer in the range starting from X, up to but not including Y.

The sample input given here states that we have 5 numbers in our list. They are 1, 3, 5, 4, 2. The range of indices we should search through is from 1, up to but not including 4. The numbers we are actually searching through are therefore 3, 5, 4, because 3 is in position 1, and 4 is in position 3 (remember up to but not including position 4).

88 . minFinding.cpp a main (int argc, const char argv]) 1 #include 2 #include "FindMin.h" 4 using namespace std; 6 int main(int argc, const char argv[]) int size; 10 const int len-size; int numbers[len]; for (int 1-0; i > numbers[i]; int start; cin > start; int end; 23 24 25 26 27 cin >> end; int minindex findMin (numbers, start, end); cout

Explanation / Answer

#ifndef FindMin_h
#define FindMin_h

int Findmin(int *arr , int start, int end) {

int min= 100000000;

for(int i = start; i<end; ++i) {


if(min > arr[i])
min = arr[i];


}

return min;

}

#endif




PASTE THE CODE I provided. LET ME KNOW IF THERE IS ANY CONCERN.


Thanks, PLEASE UPVOTE if helpful