Lab10A: Warmup. Write a program that uses an array (of size 10) to demonstrate how to use the linear search algorithm to search through a user generated list of numbers for a specific value. Assume...


Lab10A: Warmup.<br>Write a program that uses an array (of size 10) to demonstrate how to use the linear search<br>algorithm to search through a user generated list of numbers for a specific value. Assume that the<br>numbers in the list will be integers from between -100 and +100. You should store the numbers in a<br>1D array. The logic and print statements declaring whether the target is or is not in the set of numbers<br>should also be located in your main method.<br>Tip: Make sure to check out the slides in the link above for the algorithm in your language.<br>Remember, the file name should be Lab10A.<br>The user input is indicated in bold.<br>Sample output #1<br>Please enter 10 numbers:<br>Integer 1: 15<br>Integer 2: 12<br>Integer 3: 89<br>Integer 4: -14<br>Integer 5: 11<br>Integer 6: -99<br>Integer 7: 1<br>Integer 8: 42<br>Integer 9: 27<br>Integer 10: 2<br>What is the target number: 42<br>The target is in the set.<br>

Extracted text: Lab10A: Warmup. Write a program that uses an array (of size 10) to demonstrate how to use the linear search algorithm to search through a user generated list of numbers for a specific value. Assume that the numbers in the list will be integers from between -100 and +100. You should store the numbers in a 1D array. The logic and print statements declaring whether the target is or is not in the set of numbers should also be located in your main method. Tip: Make sure to check out the slides in the link above for the algorithm in your language. Remember, the file name should be Lab10A. The user input is indicated in bold. Sample output #1 Please enter 10 numbers: Integer 1: 15 Integer 2: 12 Integer 3: 89 Integer 4: -14 Integer 5: 11 Integer 6: -99 Integer 7: 1 Integer 8: 42 Integer 9: 27 Integer 10: 2 What is the target number: 42 The target is in the set.
Sample output #2<br>Please enter 10 numbers:<br>Integer 1: 15<br>Integer 2: 12<br>Integer 3: 89<br>Integer 4: -14<br>Integer 5: 11<br>Integer 6: -99<br>Integer 7: 1<br>Integer 8: 42<br>Integer 9: 27<br>Integer 10: 2<br>What is the target number: -3<br>The target is not in the set.<br>

Extracted text: Sample output #2 Please enter 10 numbers: Integer 1: 15 Integer 2: 12 Integer 3: 89 Integer 4: -14 Integer 5: 11 Integer 6: -99 Integer 7: 1 Integer 8: 42 Integer 9: 27 Integer 10: 2 What is the target number: -3 The target is not in the set.

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here