0

Java array for loop

Why the answer not equal 0 arr[0]=15 arr[2]=5 15%5=0 https://code.sololearn.com/c1dHroA05rXG/?ref=app

2nd Jun 2019, 2:39 PM
Tzion
Tzion - avatar
2 Answers
+ 3
Because first iteration of for loop is => 15 % 8 = 7, second iteration is => 7 % 5 = 2.
2nd Jun 2019, 2:44 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
TheWhÂĄteCat oh,got it thank u
2nd Jun 2019, 2:45 PM
Tzion
Tzion - avatar