I need to write the functions for this, but I can't seem to do it. I've spent way too long trying it, I know I've strayed away from the right track. Any help/explanation would be appreciated (just starting C++)
#include <iostream>
#include <ctime>
usingnamespace std;
//This program will load an integer array with random numbers
//and ask the user for a number to search for
//Will tell the user if the number is found or not
bool findIt(int* start, int* end, int value);
// look for the value starting at start and going to end
// return true if found else false
void randomizeIt(int* start, int length, int MaxNumber);
int main(){
//define variables
bool keepGoing = true;
constint arraySize = 10;
constint bigNumber = 100;
int myArray[arraySize];
int userValue = -1;
srand(time(0));
do{
if(userValue == -1)
randomizeIt(myArray, arraySize, bigNumber);
cout << "Enter number between 1 and " << bigNumber
<< "to search for (0=quit, -1=randomize array ";
cin >> userValue;
if(userValue > 0){
if(findIt(myArray, &myArray[arraySize-1], userValue))
cout << "Found " << userValue << endl;
else
cout << userValue << " not found" << endl;
}else{
if(userValue == 0) keepGoing = false;
}
}while(keepGoing);
return 0;
}