subject

Assume the following main module is in a program that includes the binarysearch function that was shown in this chapter. why doesn't the pseudocode in the main module work?

// this program uses the binarysearch function to search for a
// name in the array. this program assumes the binarysearch
// function has already been defined.

module main()
constant integer size = 5
declare string names[size] = "zack", "james", "pam", "marc", "susan"
declare string searchname
declare integer index
display "enter a name to search for."
input searchname
set index = binarysearch(names, searchname, size)
if index ! = -1 then
display searchname, " was found."
else
display searchname, " was not found."
end if
end module

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
The word ‘play’ comes with many different interpretations and a variety of definitions. discuss some of the various meanings tied to the word play. why is the concept of play thought to be an important addition to the workplace? do some (brief) research online and give an example of how play in the workplace is being done right.
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Cloud computing service providers manage different computing resources based on the services they offer. which resources do iaas and paas providers not manage? iaas providers do not manage the for the client, whereas paas providers usually do not manage the for their clients. iaas- storage server operating system network paas- applications interafce storage vertualiation
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Facial expressions and gestures are examples of messages.
Answers: 3
You know the right answer?
Assume the following main module is in a program that includes the binarysearch function that was sh...
Questions
question
Mathematics, 05.05.2020 00:10
question
Mathematics, 05.05.2020 00:10
question
Mathematics, 05.05.2020 00:10
question
Spanish, 05.05.2020 00:10
Questions on the website: 13722361