Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
Java All : Jumping within loops


Exam Paper Problems

Output Writing – For loop break #7226

( As In Exam - ICSE2017 )

Give the output of the following program segment and also mention the number

Give the output of the following program segment and also mention the number of times the loop is executed:

int a,b;
for (a = 6, b = 4; a <= 24; a = a + 6)
{
  if (a%b ==0)
    break;
}
System.out.println(a);



Exam Paper Problems:1 
Back