*** 你自己把以下语句保存在 qh.prg 中就行了:
CLOSE ALL
CLEAR ALL
CLEAR
DO WHILE .T.
INPUT "请输入一个正整数:" TO nGetNo
IF NOT TYPE([nGetNo]) = "N"
?"数据无效!"
ELSE
IF nGetNo > 0 AND INT(nGetNo) = nGetNo
EXIT
ENDIF
ENDIF
ENDDO
nTotal = 0
FOR nLoop_01 = 1 TO nGetNo
nTotal = nTotal + nLoop_01
NEXT
?nTotal
RETURN