User will enter a value size which represents the number of


Need help with the following C++ question

Practice Program

User will enter a value (size) which represents the number of values to process

    The values entered will be stored in an array of type short that has 1000 elements

    User will enter size numbers    

    The user will enter a search value;

    The program will search the data for a specific value

    program will display a message in which element the value was found or display a message the value was not found

Below is some blueprint I have so far in my mind, can anyone help me to finish implement the function to satisfy the requirement for this program?

#include

using namespace std;

void input_data(short data[], short size);

void sequential_search(short data[], short size, short search_value, short &offset);

int main()

{  // declare local variables

   int search_again;

   // input the number of values to store in the array

   // call the function to input the data into the array

   do // posttest loop - will execute at least one time

   {

      // input a search value

      // call sequential_search function

      // display a message to output the element # where search value was found or message value not found

 

      cout<<"To search for another number enter the digit 1 otherwise enter the digit 0 ";

      cin>>search_again; 

while(search_again != 0);   

   //return 0;      

}

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: User will enter a value size which represents the number of
Reference No:- TGS02755051

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)