Question: #include #include #include using namespace std; void FindName ( vector searchList, int minIndex, int maxIndex ) { int midIndex; int rangeSize; / * Your code

#include
#include
#include
using namespace std;
void FindName(vector searchList, int minIndex, int maxIndex){
int midIndex;
int rangeSize;
/* Your code goes here */
cout << "Number of elements in the range: "<< rangeSize << endl;
cout << "Middle index: "<< midIndex << endl;
cout << "Element at middle index: "<< searchList.at(midIndex)<< endl;
}
int main(){
vector dataList;
int numData;
int i;
string item;
cin >> numData;
for (i =0; i < numData; ++i){
cin >> item;
dataList.push_back(item);
}
FindName(dataList,0, dataList.size()-1);
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!