CS245 - CS II Spring 1997 LAB 8
Due by the end of lab(Mar. 25, 1997):
Write a program that
- reads in an array of numbers from the keyboard,
- asks the user to enter a number to find in the array,
- uses a find function (similar to the one below) to find the requested number in the array and return
its positions or -1 if it is not in the array.
- let the user know the result of the search.
int Find(IntArray arr, int match, int end)
{
for (int j = 0; j <= end; j++)
if (arr[j] == match)
return j;
return -1;
}