主题:儿子参加一个BASIC培训,有许多题不会做,请教高手(2)
REM Test32
DIM a(10)AS INTEGER
FOR i=1 TO 10
a(i)=i
NEXT i
FOR i=1 TO 5
SWAP a(i),a(11 -i)
NEXT i
PRINT a(i),a(11 -i)
END
本题的运行结果是:
DIM a(10)AS INTEGER
FOR i=1 TO 10
a(i)=i
NEXT i
FOR i=1 TO 5
SWAP a(i),a(11 -i)
NEXT i
PRINT a(i),a(11 -i)
END
本题的运行结果是: