0
Need solution
Why the output is 121212? Explain please..... int value=10; for(int k=0; k<=2; k++) System.out.printf("%d",value+2);
3 Respostas
+ 4
Mustakim Rahman
value is always 10 now think why 121212
Remember k = 0 to k <= 2 so loop runs 3 times
+ 2
System.out.printf("%d ",value+2); // output is 12 12 12