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
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