In each of 24-28, determine how many times innermost loop will be iterated when thw algorithm sefrnent is implemented and run. (Assume that
The objective is to determine the number of times the innermost loop will be iterated when the algorithm segment is implemented and run.
Given information:
Algorithm segment is implemented and run.
Concept used:
Assume that
Consider the algorithm below:
The objective is to determine the number of times the innermost loop will be iterated when the algorithm segment is implemented and run.
Calculation:
It is given that
The numbers of integers from
The numbers of integers from
The outer loop is iterated
Thus, by the rule of multiplication, the total number of iterations of the inner loop is,