Can you post a picture so its better to understand
I think this is what you mean
Answer:
(a) 4i times
(b) "i × n" times
Step-by-step explanation:
(a) Given the algorithm segment;
for i := 1 to 4, (Outer loop)
for j := 1 to i (Inner loop)
next j,
next i
The inner loop runs for i times, while the outer loop runs for 4 times.
The total times the inner loop would run when the entire algorithm is run is:
= i × 4
= 4i times
(b) Given the algorithm segment;
for i := 1 to n, (Outer loop)
for j := 1 to i (Inner loop)
next j,
next i
Where n is a set of positive integers.
The inner loop runs for "i" times, while the outer loop runs for "n" times.
The total times the inner loop would run when the entire algorithm is run is:
= i × n
= "i × n" times
Answer:
1:
2
Step-by-step explanation:
If I helped, a brainliest answer would be greatly appreciated!
Answer- 7x+7
Explanation- o o o o Reilly auto parts OW