Represents the number of values to process

Assignment Help Basic Computer Science
Reference no: EM131960578

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<iostream>

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;      

}

Reference no: EM131960578

Questions Cloud

Weights for investor to create her complete portfolio : Calculate the weights for the investor to create her Complete Portfolio. Calculate the Expected Return for this Complete Portfolio.
Equilibrium quantity of milk : A new per unit tax imposed on milk consumers is Not a possible explanation that the equilibrium quantity of milk has fallen while the market price has increased
How do customs manners and social structure figure into mix : How do customs, manners and social structure figure into the mix? What special skills would be required to be an effective global leader?
Prepare a project for all schools : You are the principle of a high school, The governor is concerned about the increase of school shootings. The governor has tasked you prepare a project.
Represents the number of values to process : User will enter a value (size) which represents the number of values to process
Find the return on asset and return on capital invested : Find the Return on Asset (ROA) and Return on Capital Invested (ROCI).
Discuss media availability to determine costefficient method : Discuss media availability to determine cost-efficient methods of communicating with potential students within the country and within the geographic region.
Statements regarding risk-averse investors is true : Which of the following statements regarding risk-averse investors is true?
Compute cross rate exchange between currencies : How to compute cross rate exchange between currencies.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Security of the facilities

Write 2 pages of the physical security policy section for Home Depot regarding their security incident. Include the follow:Security of the facilities:  -Physical entry controls

  Service in spite of ip unreliable service

TCP creates a reliable data transfer service, in addition to IP's unreliable best-effort service. Study this statement, and in your own words, summarize how TCP provides a reliable data transfer service.

  Discuss the configuration and activation of auditing

Discuss the configuration and activation of auditing for files, users or other system objects to help technical personnel recognize, diagnose, deter and/or work to prevent attempts to compromise or break into a computer network.

  Services in your area

Research DSL and cable modem services available closest to your community. You may use neighboring communities or regions if your community does not have access to DSL or cable modem services. Researched material must be focused on the technical a..

  Mosquito no company claims

1. The Mosquito No Company claims that its electronic mosquito device will "eliminate all mosquito problems within on-half acre."

  Natural byproduct of an interconnected world

E-commerce is a natural byproduct of an Interconnected world.

  Advantages and disadvantages of open source licensing

Topic: Discuss the .advantages and disadvantages of open source licensing

  What choice do you recommend for him

Marcus's other potential staff member is Kim Danville. Prior to joining ICAN Mutual, Kim had considerable work experience with the expert system technologies that ICAN has chosen for this expert system project. Marcus was counting on Kim to help i..

  Automata theory, grammars and languages ip

Task Background: This assignment involves solving problems by using various discrete techniques to model the problems at hand. Quite often, these models form the foundations for writing computer programming code that automate the tasks. To carry ..

  Evaluating a definite integral

You Decide Cole says that when evaluating a definite integral, the order in which you substitute a and b into the antiderivative and subtract does not matter. Rose says it does matter. Who is correct? Explain.

  Quantity of real gdp supplied

Complete the following statements: 1) In the short run, when the price level increases, the quantity of real GDP supplied will

  How can you find an attribute in a word problem

How can you find an attribute in a word problem? How can you find an entity in a word problem?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd