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

  How many system calls can the computer execute

How many system calls can the computer execute per second and still have half the CPU capacity for running application code?

  Why are buses used in computers

Why are buses used in computers? Describe the similarities and differences between the computer bus and the electric power grid.

  Write a program to find the number of intersecting pairs

Write a program to find the number of intersecting pairs among a set of N random horizontal and vertical lines, each line generated with two random integer.

  Write down the program in vb.net

Write down the program in VB.Net with a graphical user interface. Make the program Web based.

  Compare different intel processors in android devices

Compare and contrast the different Intel processors in Android phone and tablets. Practice converting between decimal and binary.

  Describe your thoughts about what professionalism would mean

Describe your thoughts about what "professionalism" would mean to someone who is in the role of network administrator. How would that compare to someone who was a systems analyst or a programmer?

  What is the future improvement and suggestion of cam design

Write a review paper of one mechanism we have learned this semester including its application, changes in design with time, and future direction.

  Create a web page about your favorite musical group

Create a Web page about your favorite musical group. Include the name of the group, the individuals in the group and a hyperlink to the group's Web site.

  Clearly describe the information security issue

Clearly describe the information security issue, Provide a discussion of the cultural/contextual issues associated with the information security issue

  At which layer would you implement that protocol

Suppose you wanted to implement a new routing protocol in the SDN control plane. At which layer would you implement that protocol? Explain.

  Create a trigger for auditing

Create a trigger for auditing ?create trigger audit_customers on the Custoners table.

  Can we use that algorithm as a subroutine to approx

Can we use that algorithm as a subroutine to approximately solve other NP problems in polynomial time?

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