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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:00, trintrin227
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
image
Computers and Technology, 23.06.2019 14:00, ava5015
What is html ? give a small description about html
Answers: 2
image
Computers and Technology, 23.06.2019 21:00, tiffg2588
Will this setup result in what kathy wants to print?
Answers: 2
image
Computers and Technology, 24.06.2019 03:00, SiegeHatake4534
Will do anything for brainlest so can you guys me out i will try my best to you out
Answers: 1
You know the right answer?
Assume the following main module is in a program that includes the binarysearch function that was sh...

Questions in other subjects:

Konu
Mathematics, 23.12.2019 03:31
Konu
Mathematics, 23.12.2019 03:31