Determine how many times the innermost loop will be iterated when the algorithm segment is implemented and run. (Assume that m and n are positive integers.)

for j := 1 to m
for k := 1 to n
[Statements in body of inner loop.
None contain branching statements that
lead outside the loop.]
next k
next j

Respuesta :

Answer:

  mn

Explanation:

For each of the m iterations of the outer loop, the inner loop is run n times. The total number of times the innermost loop is run is ...

  m×n

ACCESS MORE