✔ 最佳答案
First, you set up an array called list1, which has ten elements. Then you set the value of the elements as the integers 0 through 9.
Next you define a new array of ten elements called list2. But we don't set the value of this array yet.
Now you use a for loop. You use the counter i to make the loop run through 10 iterations. Here is what the loop does:
First Iteration: i = 0. The first element of list2 (list2[i] = list2[0]) is set to 9 - i, which is 9 - 0, or 9. Now you add 1 to i. Now we print the first element of list1 (0) and the first element of list2 (9) together as a pair, and then tell it to drop to a new line on the console.
Second iteration: i = 1. The second element of list2 is set to 9 - i, which is 9 - 1, or 8. Now you add 1 to i. We print the pair again, and get list1[1] = 1 and list2[1] = 8, thus 18.
Third iteration: i = 2, etc.