Explanatory Question
Analyze the given program segment and answer the following questions:
- Write the output of the program segment.
- How many times does the body of the loop gets executed ?
for(int m = 5; m <= 20; m += 5) { if(m % 3 == 0) break; else if(m % 5 == 0) System.out.println(m); continue; }
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.