Computers and Technology
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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:30, coollid876
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
image
Computers and Technology, 22.06.2019 17:00, smartoa
Annie is creating a corporate report for a company’s annual meeting. in the report, she wants to add the signature of various department heads. which device can annie use to capture signatures to include in the report? a. printer b. monitor c. e-reader d. digitizing tablet
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, jayjay5246
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
image
Computers and Technology, 23.06.2019 18:40, cyn95xx
Johnson enterprises uses a computer to handle its sales invoices. lately, business has been so good that it takes an extra 3 hours per night, plus every third saturday, to keep up with the volume of sales invoices. management is considering updating its computer with a faster model that would eliminate all of the overtime processing.
Answers: 2
Do you know the correct answer?
1. Create a primary array that can hold 100 integers. 2. Use the file 'input_numbers. txt' to popul...

Questions in other subjects:

Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01
Konu
Mathematics, 11.09.2020 01:01