dimension arr(10)
for i=1 to 10
arr(i)=i
endfor
for j=1 to 5
t=arr(j)
arr(j)=arr(11-j)
arr(11-j)=t
endfor
åå¦ä¸æ¯10,æ¯ä»»æä¸ä¸ªå¤§äºçäº2çæ´æ°n
input '请è¾å
¥ä¸ä¸ªå¤§äºçäº2çæ´æ°' to n
dimension arr(n)
for i=1 to n
arr(i)=i
endfor
for j=1 to int(n/2)
t=arr(j)
arr(j)=arr(n+1-j)
arr(n+1-j)=t
endfor
温馨提示:答案为网友推荐,仅供参考