第一问:
在最后一个 〔Next〕之后、〔Return〕之前加上以下语句:
*** ==========
cGetNo = ""
nGetNo = 0
FOR nLoop_01 = 1 TO 10
nGetNo = nGetNo + A(nLoop_01)
IF nLoop_01 = 1
cGetNo = ALLTRIM(STR(A(nLoop_01)))
ELSE
cGetNo = cGetNo + ", " + ALLTRIM(STR(A(nLoop_01)))
ENDIF
NEXT
?"最大数为:", MAX(&cGetNo.)
?"最小数为:", Min(&cGetNo.)
?"平均值为:", nGetNo/10
*** ==========
第二问:皮信
*** ========早手==陆握嫌
nNum01 = 1
nNum02 = 2
nTotal = nNum01/nNum02
FOR nLoop_02 = 1 TO 15
IF nLoop_02 = 1
??ALLTRIM(STR(nNum01)) + "/" + ALLTRIM(STR(nNum02))
ELSE
??" + " + ALLTRIM(STR(nNum01)) + "/" + ALLTRIM(STR(nNum02))
ENDIF
nTmpNo = nNum01
nNum01 = nNum02
nNum02 = nTmpNo + nNum01
nTotal = nTotal + nNum01/nNum02
NEXT
?? "="
??nTotal
*** ==========
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)