subject
Computers and Technology, 28.06.2021 15:30 hamzaha

1. Create a primary array that can hold 100 integers. 2. Use the file 'input_numbers. txt' to populate the primary array in your program. You can obtain this file from github. com. See the Lab Supplement- Using Git for more information. The repository you want to use is located on the server github. com, and the path to the repository is /untamedspud/october2019lab9.
3. Read through the file, inserting each integer into the primary array in ascending order as you read them in. So if you read in 40, your array is 40, Then you read in 10, you should have in your array 10 40, and then you read in 20, your array should be 10 20 40
4. Use a function insert_in_array_ascending( ) to insert each value read in from the file into the primary array. This function is responsible for keeping the array ordered as each individual value is inserted.
5. Write a function print_int_array( ) which takes two parameters, an integer array, which will be our primary array, and a count of the number of elements to be printed. After reading in each number and storing it in the array, call print_int_array( ) to display the array so far.
6. Write an interactive function get_value_from_user( ) which prompts the user for a number that may or may not be found in the primary array. Test the numbers [40 41 42 43 7 8 9 10 54 50]
7. Write a function is_in_array( ) which returns true if a value passed in as a parameter exists in the array, and false otherwise. This function should use a binary search to find the value.
input_numbers. txt
40, 4, 18, 33, 2, 49, 22, 39, 19, 3 17, 54, 57, 48, 5, 21, 27, 9 42, 2, 43
test_numbers. txt
40, 41, 42, 43, 7, 8, 9, 10, 54, 50

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 21:20
For positive constants a and b, the force between two atoms in a molecule is given f(r) = −a r2 + b r3 , where r > 0 is the distance between the atoms. note: a and b are upper case letters. (a) find f '(r) = (b) find the critical point for f(r). r = (c) find f ''(r) = (d) find the value of r so that f ''(r) = 0.
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
You know the right answer?
1. Create a primary array that can hold 100 integers. 2. Use the file 'input_numbers. txt' to popul...
Questions
question
Biology, 20.08.2021 22:00
question
History, 20.08.2021 22:00
question
Biology, 20.08.2021 22:00
question
Mathematics, 20.08.2021 22:00
question
History, 20.08.2021 22:00