Question: 1 . Each code segment below starts with some comments ( lines that begin with two slashes ) that describe the program. Examine the pseudocode
Each code segment below starts with some comments lines that begin with two slashes that describe the program. Examine the pseudocode that follows the
introductory comments, then find and correct all the bugs as specified in the homework assignment instructions file
b This application reads numbers and sorts them, then displays the
three highest numbers
start
Declarations
num SIZE
num number
num numbersSIZE
num count
getReady
while count SIZE
detailLoop
end
finish
stop
getReady
output "Enter a number
output number
return
detailLoop
numberscount number
count count
output "Enter a number
output number
return
finish
sort
output "The highest three are numbers numbers numbers
return
sort
num x
num y
num COMPS count
while y COMPS
x
while x COMPS
if numbersx numbersx then
swap
endif
x x
endwhile
y y
end
return
swap
num temp
temp numbersx
numbersx numbersx
numbersx temp
return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
