Question: Submit work for Taski and Task2 in one pdf file, and submit the code (cpp) for Task3 and Task4 in one .cpp file. Task 3-Working

 Submit work for Taski and Task2 in one pdf file, and
submit the code (cpp) for Task3 and Task4 in one .cpp file.

Submit work for Taski and Task2 in one pdf file, and submit the code (cpp) for Task3 and Task4 in one .cpp file. Task 3-Working with vector [10 points] Write a C++ program store each of them in a vector After the user has inputted all the integers required, the program shall display all the integers in the vector. You need to fulfill the following tasks: 1. First prompt the user for the number of integers that they would like to enter 2. Then, prompt the user to enter the integers one by one. 3. Display the integers in the vector The expected output in the console should be exactly as shown below This is an example output when a user enters 5 integers. Welcome!!! Please enter how many integers you would like to input: 5 Please input integer 1 100 Please input integer 2:200 Please input integer 3 300 Please input integer 4:400 Please input integer 5:500 You have entered 100 200 300 400 500 This is an example output when a user enters 3 integers. Welcome!!! Please enter how many integers you would like to input: 3 Please input integer 1:3 Please input integer 2:4 Please input integer 3:5 You have entered: 3 45 that takes n integers from the users. Then Task 4 Linear Search [10 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 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!