+ 1

What is the meaning of a? (Look at the comment of my program)

https://code.sololearn.com/cZZ1z8L8uB3S/?ref=app

24th Dec 2017, 11:01 AM
Kevin Wijaya
Kevin Wijaya - avatar
2 Réponses
+ 8
Variable 'a' is responsible for the iteration process by being the index which specifies the starting point, and the termination condition. The variable is also used as one of the array indexes to iterate through the multidimensional array from each iteration of the for loop.
24th Dec 2017, 11:22 AM
Hatsy Rei
Hatsy Rei - avatar
+ 6
for (a = 0; a < 3; a++) so a will take values 0, 1, and 2 for each loop. The loop will run three times. Substitute these values into the loop content and you will see what the loop does, with some calculation and tracing.
24th Dec 2017, 1:41 PM
Hatsy Rei
Hatsy Rei - avatar