Who can help me? C++?

Step through the following algorithm and record what the output is (i.e. what would be

displayed on the screen by the print step)

set a to 6,12,1,2,10,0

set size to 6

set k to 0

set h to 0

while k<size-1 do

set j to k+1

while j<size do

if a[j] < a[k] then

set h to a[k]

set a[k] to a[j]

set a[j] to h

set j to j+1

print a[0], a[1], a[2], a[3], a[4], a[5]

set k to k+1

end

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 1QUIZZ.COM - All rights reserved.