Computer Science, asked by kondrugamer2005, 8 months ago

g) 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):

Answers

Answered by Enrique001
6

Answer:

6

18

The condition is not clear, if condition is

a<=24, 4 times

a< 24, 3 times

a=24, 1 times ( output will be void)

Hope it helps, follow for more answers

Answered by jiggy19
1

Answer:

i want to ask questions from you

Similar questions