0
answers
1
watching
40
views
papayaprofessorLv10
15 Sep 2022
Consider the code segment below.
a) Give the final values of variables k, j and count when the code is finished running?
b) How many times the body of the inner loop is executed?
count := 0
For k = 1 to 3
For j = k +1 to 4
count := count + k ⋅ j // the body of the inner loop
End-for
End-for
Consider the code segment below.
a) Give the final values of variables k, j and count when the code is finished running?
b) How many times the body of the inner loop is executed?
count := 0
For k = 1 to 3
For j = k +1 to 4
count := count + k ⋅ j // the body of the inner loop
End-for
End-for