subject
Computers and Technology, 29.01.2020 05:44 lucy773

Aprogrammer develops the procedure makenumslist() to generate lists of numbers starting at start and ending with the end. for example, makenumslist(4, 7) should return [4, 5, 6, 7].
procedure makenumslist(start, end) {
numslist ← []
numtimes ← (end - start) + 1
num ← 1
repeat numtimes times {
append(numslist, num)
num ← num + 1
}
return numslist
}
the programmer tests it with makenumslist(1, 4) and sees a return value of [1, 2, 3, 4].
can the programmer conclude that the procedure works correctly for all inputs?

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, yoyo9661
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, TheBurntToast
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
image
Computers and Technology, 23.06.2019 05:20, reeeeeee32
What did creator markus “notch" persson initially call his game
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, sugaree95
What are three software programs for mobile computing?
Answers: 1
You know the right answer?
Aprogrammer develops the procedure makenumslist() to generate lists of numbers starting at start and...

Questions in other subjects: