0
Explain me how can this thing happen?
2 Respostas
+ 1
It's because the loop only runs once. If you want it multiplied by 4 and 3, you should've made the loop like this:
for (int i = 2; i > 0; i--)...
0
i = 2
a[0] *= a[2] //a[0] = a[0] * a[2] = 1 * 4 = 4
i = 1 -> end loop because 1 is not > 1
Output: 4