In: Statistics and Probability
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 |