N Ngọc Tú Member Sep 19, 2021 #1 The number of iterations in the following loop is Code: p=3;for i=(3:4) p=p+2; end A. 0 B. 1 C. 3 D. 4
The number of iterations in the following loop is Code: p=3;for i=(3:4) p=p+2; end A. 0 B. 1 C. 3 D. 4
N Như Quỳnh New member Sep 19, 2021 #2 Answer: d Explanation: If the counter value is <= the final value, the loop will perform an iteration. Hence, the above loop iterates twice to yield p=6. There is no error. Upvote 0 Downvote
Answer: d Explanation: If the counter value is <= the final value, the loop will perform an iteration. Hence, the above loop iterates twice to yield p=6. There is no error.