subject

So i'm using kahn academy but it keeps saying i have bad invocation in {guess = 3((max + min) / 2); } right before the three. i am not sure what i'm doing wrong can someone ? (this is using javascript) ? i will give good points and brainliest. the instructions given were: 1. let min = 0 and max = n-1.2. if max < min, then stop: target is not present in array. return -1.3. compute guess as the average of max and min, rounded down (so that it is an integer).4. if array[guess] equals target, then stop. you found it! return guess.5. if the guess was too low, that is, array[guess] < target, then set min = guess + 1.6. otherwise, the guess was too high. set max = guess - 1.7. go back to step 2./* returns either the index of the location in the array, or -1 if the array did not contain the targetvalue */var min = 0; var max = array. length - 1; var guess; while (min < max) {guess = 3((max + min) / 2); if (array[guess] === targetvalue) {return guess; } else if (array[guess] < targetvalue) {min = guess - 1; } else {max = guess + 1; }}return -1; }; var primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]; var result = dosearch(primes, 73); console. log("found prime at index " + result); //print (primes[]); //program. assertequal(dosearch(primes, 73), 20);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Two technicians are discussing the common u-joint. technician a says its input and output speeds should be equal. technician b says that it normally has two yokes. which technician is correct?
Answers: 1
question
Computers and Technology, 22.06.2019 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
What is the purpose of a computer network needs assessment? to analyze which workers need more training to improve their performance to compare worker productivity to determine what steps employees can take to increase company revenue to evaluate how to move from the current status to the desired goal
Answers: 2
You know the right answer?
So i'm using kahn academy but it keeps saying i have bad invocation in {guess = 3((max + min) / 2);...
Questions
question
Mathematics, 09.02.2021 16:50
Questions on the website: 13722366