关于vf的题,DIMENSION A(6)FOR K=1 TO 6A(K)=20-2*kENDFORK=5DO WHILE K>=1A(K)=A(K)-A(K+1)K=K-1ENDDOA(1),A(3),A(5)

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 07:58:33
关于vf的题,DIMENSION A(6)FOR K=1 TO 6A(K)=20-2*kENDFORK=5DO WHILE K>=1A(K)=A(K)-A(K+1)K=K-1ENDDOA(1),A(3),A(5)
xSMO@+{l@Áb#DM{07uPG@gR'aEIe^8ț^`HhN[|D~n؟gu4_q]hZm\+U[8,2129.nO# q@0(* \,,2un=L.vA:VӴ`_5pn>٘FPej$nY/L\U`~O%{'f&o4J/ 4QEμum`ʩQ!&JRH

关于vf的题,DIMENSION A(6)FOR K=1 TO 6A(K)=20-2*kENDFORK=5DO WHILE K>=1A(K)=A(K)-A(K+1)K=K-1ENDDOA(1),A(3),A(5)
关于vf的题,
DIMENSION A(6)
FOR K=1 TO 6
A(K)=20-2*k
ENDFOR
K=5
DO WHILE K>=1
A(K)=A(K)-A(K+1)
K=K-1
ENDDO
A(1),A(3),A(5)

关于vf的题,DIMENSION A(6)FOR K=1 TO 6A(K)=20-2*kENDFORK=5DO WHILE K>=1A(K)=A(K)-A(K+1)K=K-1ENDDOA(1),A(3),A(5)
DIMENSION A(6) 定义数组A,共6个元素
FOR K=1 TO 6 循环变量K从1循环到6
A(K)=20-2*k 第K个数组元素赋值为20-2*k,A(1)=18,a(2)=16,a(3)=14,a(4)=12,a(5)=10,a(6)=8
ENDFOR FOR循环结束
K=5 变量K值为5
DO WHILE K>=1 当K>=1时循环
A(K)=A(K)-A(K+1) A(5)=2,a(4)=10,a(3)=4,a(2)=12,a(1)=6
K=K-1 循环变量K值减少1
ENDDO DO WHILE循环结束
?A(1),A(3),A(5) 输出A(1),A(3),A(5)的值

最后结果是6 4 2