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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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