+ 2
The output is 048 but I don't understand how anyone who understand plzz explain this...☺
for (int i=0 ; i < 10; i++ ) { if ( i% 4 == 0 ) { System. out.print(i) ; } }
2 Antworten
+ 13
i will take 0,1,2,3,.....,9
i will only get printed when i%4 is 0 , that is, when i/4 leaves remainder 0.
this is true for values 0,4,8.
hence 048 is printed
0
You want only who's value that remainder is zero so in this case that are the values got remaining zero
So it will printed in said scenario.....