A program to implement two different searching techniques

Assignment Help Computer Engineering
Reference no: EM132208453

Write a program in C++ to implement two different searching techniques:

- Linear search

- Binary search

on a set of integer values stored in a single dimension array.

The user will provide as input the set of the integer values and the number they did like to search for, and the option for the search technique they did like to use.

Based on these three inputs provided by the user, your program will output a success prompt and the array index at which the value was found; if the search was successful. Or it should prompt a "not found" message and an option to re-try the search.

Your program must be written using functions (worth 10 points).

Input case: 7,2,5,67,89,11,23,6,18,43

option: Linear Search

Search value: 16

option: Binary Search

Search Value: 11

Reference no: EM132208453

Questions Cloud

A program to store the test grades in an array : Write a program in C++ that will ask the user to input 5 test grades. Store the test grades in an array.
Accept command line options to use in the program : Write a program in C++ that will accept command line options to use in the program. Command line option 1 will be the program name.
What is the maximum gst credit for the family : Consider a Canadian family of five - two adults and three children (age 5, 9 and 12). Currently there are two wage earners in the family - the husband's annual.
A prpgram to prompt the user for his or her first name : Write a program in C++.Prompt the user for his/her first name. Output the user's nickname. Use this algorithm to generate a nickname.
A program to implement two different searching techniques : Write a program in C++ to implement two different searching techniques: - Linear search - Binary search
Prompts you to enter a positive integer value or q to quit : Use "tail recursion" where a function calls itself as explained on page 356 to calculate the sum of all integers from 1 to the value entered.
How would mary proof negligence against chariot hotel : How would Mary proof negligence against Chariot Hotel if the cause of the severe breathing problem was the fact that Chariot Hotel staffs did not vacuum.
Allow the user to choose which lines to display on screen : Write a program in C that will Open a text file, Read the text file, and allow the user to choose which lines to display on the screen.
Display the total amount of money the machine earned : Display the total amount of money the machine earned and save all the data back into the input file "drinks.txt".

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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