Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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;      

}

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92798235
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question a sequential circuit with two d flip-flops a and b

Question : A sequential circuit with two D flip-flops A and B, one input X and one output Y is specified by the following equations: Da = X'(A+B), Db = A'B, Y = A'XB' (a) Draw the circuit diagram. (b) Derive the state ta ...

Sectuon 112 build draw binary search tree with the names

Sectuon 11.2: Build draw binary search tree with the names Doc, Grumpy, Happy, Sleepy, a Bashful, Sneezy, Dopey, inserted in the order provided here. Assume that, on future searche of this tree, each name is equally like ...

Find minimal dfas for the following languages in each case

Find minimal dfa's for the following languages. In each case prove that the result is minimal. (1) L = {a n bm> :n≥2,m≥1}. (2)L = {a n :n ≥ 0,n ≠ 3} (3) L = {a n :n mod 3 = 0}∪{a n : n mod 5 = 1}

Sql database designstore a is a local bookstore store a has

SQL DATABASE DESIGN Store A is a local bookstore. Store A has been able to withstand the challenges of larger bookstore chains, as well as the internet giant Amazon, by offering new and used books and other products in a ...

A random sample ofnbsp77nbspeighth gradenbspstudents scores

A random sample of 77 eighth grade? students' scores on a national mathematics assessment test has a mean score of 285. This test result prompts a state school administrator to declare that the mean score for the? state' ...

Command to move all the sh files from current folder to

Command to move all the .sh files from current folder to parent directory. (single line Unix)

You get hired as a machine learning expert at moviescom

You get hired as a Machine learning expert at movies.com. Your task on day one is to improve the performance of a classifier. You divide the data into 2 parts training, and testing. You learn a model from the training da ...

Question students will turn a basic python set of files

Question : Students will turn a basic Python set of files into one single batch file. This will demonstrate students understanding of sequential scripting. Student will developed a simple 3-6 line code script file. Using ...

Restaurant management database project the restaurant

Restaurant Management Database Project : The restaurant maintains the catalog for the list of food and beverage items that it provides. Apart from providing food facility at their own premises, the restaurant takes order ...

A string in c is simply an array of characters with the

A string in C++ is simply an array of characters with the null character(\0) used to mark the end of the string. C++ provides a set of string handling function in as well as I/O functions in . With the addition of the ST ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As