For i=1 to 6 step 2a(i)=a(i)+iNext i数组元素a(1)到a(6)的初始值依次为5,9,8,10,5,3.上述程序运行结束后,数组a(1)到a(6)的值依次是A.5,9,8,10,5,3 B.6,11,11,14,10,9 C.3,5,10,8,9,5 D.6,9,11,10,10,3
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 06:17:01
For i=1 to 6 step 2a(i)=a(i)+iNext i数组元素a(1)到a(6)的初始值依次为5,9,8,10,5,3.上述程序运行结束后,数组a(1)到a(6)的值依次是A.5,9,8,10,5,3 B.6,11,11,14,10,9 C.3,5,10,8,9,5 D.6,9,11,10,10,3
For i=1 to 6 step 2
a(i)=a(i)+i
Next i
数组元素a(1)到a(6)的初始值依次为5,9,8,10,5,3.上述程序运行结束后,数组a(1)到a(6)的值依次是
A.5,9,8,10,5,3 B.6,11,11,14,10,9 C.3,5,10,8,9,5 D.6,9,11,10,10,3
For i=1 to 6 step 2a(i)=a(i)+iNext i数组元素a(1)到a(6)的初始值依次为5,9,8,10,5,3.上述程序运行结束后,数组a(1)到a(6)的值依次是A.5,9,8,10,5,3 B.6,11,11,14,10,9 C.3,5,10,8,9,5 D.6,9,11,10,10,3
数组下标:1 2 3 4 5 6
数组值:5 9 8 10 5 3
i 取值即更改的以i为下标的数组值 1 3 5
更改后数组值 6 9 11 10 10 3
答案选D
备注:有i可以取值的地方,数组值要变,具体变为原值+i
i不取值的地方,数组值不变