1. please help me get the correct code that runs correctly

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1. please help me get the correct code that runs correctly

Post by answerhappygod »

1.
please help me get the correct code that runs correctly
1 Please Help Me Get The Correct Code That Runs Correctly 1
1 Please Help Me Get The Correct Code That Runs Correctly 1 (58.61 KiB) Viewed 15 times
1) Write code for the functions described below and determine its Big-O. Please justify your response for full credit. Specifically, once you have developed the code, count the approximate number of operations needed to execute it (12 pts): a. An int returning function that takes in an integer array and finds the smallest value in that array. b. A void function that takes in an array of n integers and finds the sum of all the elements in the array. c. A void function that takes in a double value and outputs the square root of that number, that is if it is non-negative. If it is negative, then it is to output a message saying that the square root cannot be found. d. A double function that takes in a two-dimensional integer array of n rows and n columns and iterates through it using a double for loop. As the array is being searched through, all of the elements are summed up. Once all of the elements are added together, the sum is divided by the total number of elements in the array.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply