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 05:00
Pls do you believe that the use of 3d animation has grown in feature films over the last few years? if so, do you think the trend will continue? what are the forces driving this trend?
Answers: 2
question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
After you present a proposal, the committee starts asking you questions, some beyond the strict focus of your proposal. they ask questions about implications in other fields and knowledge about other fields. you are asked to redo your proposal. what is most likely missing? breadth of material depth of material clarity of material details of material
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
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
Spanish, 21.04.2020 21:00
Questions on the website: 13722361