CLOSE ALL
CLEAR ALL
CLEAR
SET TALK OFF
RAND(-1)
DIMENSION aMyArray(10) AS NUMERIC
?
?"生成了以下十个随机数:"
?
?
FOR nLoop_01 = 1 TO 10
aMyArray(nLoop_01) = INT(RAND() * 100) + 1
??aMyArray(nLoop_01)
NEXT
= ASORT(aMyArray)
?
?
?"升序显示这十个随机数:"
?
FOR nLoop_02 = 1 TO 10
??aMyArray(nLoop_02)
NEXT
= ASORT(aMyArray, 1, 0, 1)
?
?
?"降序显示这十个随机数:"
?
FOR nLoop_03 = 1 TO 10
??aMyArray(nLoop_03)
NEXT
SET TALK ON