D
解析:开始数组被赋值后,A(1)=27,A(2)=24,A(3)=21,A(4)=18,A(5)=15,A(6)=12。进入 DO WHILE 后,数组又被重新赋值,当K=5时,A(5)=A(5)—A(6)=15—12=3,当K=4时,A(4)= A(4)—A(5)=18—3=15,当K=3时,A(3)=A(3)—A(4)=21—15=6,当K=2时,A(2)=A(2)—A(3) =24—6=18时,当K=2时,A(2)=A(2)—A(3)=24—6=18,当K=1时,A(1)=A(1)—A(2)= 27—18=9。所以最后A(1)=9,A(2)=18,A(3)=6,A(4)=15,A(5)=3,A(6)=12。