Computer Science, asked by shynimanu1234, 4 months ago

what will be the output of the following java program int i=1 ;. while (i<=20) { if (i==10) break; i=i*2; system.out.println(i);}​

Answers

Answered by Oreki
3

Given Snippet:

int i = 1;

while (i <= 20) {

if (i == 10) break;

i = i * 2;

System.out.println(i);

}

Output:

2

4

8

16

32

Similar questions