1. Engineering
  2. Computer Science
  3. count the number of iterations in the following loops please...

Question: count the number of iterations in the following loops please...

Question details

Count the number of iterations in the following loops. please explain clearly with steps. and please be open for queries. Thank you .

(a)
int count = 0;
while (count < n) {
  count++;
}

(b)
for (int count = 0;
  count <= n; count++) {
}

(c)
int count = 5;
while (count < n) {
  count++;
}

(d)
int count = 5;
while (count < n) {
  count = count + 3;
}
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution