Question
I need help with this program: write a complet program to read a squence of positive integersfro the user until -1 is read, ask the user to enter a specificnumber, and print the position of the number in thesequence(array). do this: 1.declear an array of integers 2. assume the number of integers is at most50 declear a global name constant for the array size 3. main driver must call the following: void ReadInteger(int [], int&size) int search(const int[], intsize) I need help with this program: write a complet program to read a squence of positive integersfro the user until -1 is read, ask the user to enter a specificnumber, and print the position of the number in thesequence(array). do this: 1.declear an array of integers 2. assume the number of integers is at most50 declear a global name constant for the array size 3. main driver must call the following: void ReadInteger(int [], int&size) int search(const int[], intsize)
Explanation / Answer
please rate - thanks #include using namespace std; #define SIZE 50 void ReadInteger(int [], int& ); int search(const int[], int ); int main() {int array[SIZE],count=0,loc; ReadInteger(array,count); cout