Question: Please do it c++ , thank you ask 4 Linear Search T1o points Given a vector with the following elements 4,7,8,2,1,10, 20, 100, write a

Please do it c++ , thank you  Please do it c++ , thank you ask 4 Linear Search

ask 4 Linear Search T1o points Given a vector with the following elements 4,7,8,2,1,10, 20, 100, write a function to search a given integer x in the vector. Prompt the user for the integer x that they would like to find. If the x, can be found output "x can be found at index i", otherwise output "x cannot be found!" For example Input the element that you would like to find: 4 4 can be found at index e Input the element that you would like to find: 100 100 can be found at index 7 Input the element that you would Like to find: 2 can be found at index 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!