三个问题都是循环,不用说你现在在学for语句。
1.
clear
s=0
i=0
do while s<=1000
i=i+1
s=s+i*i
enddo
out=i-1
?"out=",out
return
2.
clear
?"请输入3个数"
dime d(3)
for i=1 to 3
input "第"+alltrim(str(i))+"个数:" to d(i)
endfor
for i=1 to 2
for j=i+1 to 3
if d(i)
d(i)=d(j)
d(j)=n
ENDIF
endfor
endfor
a=d(1)
b=d(2)
c=d(3)
?"a=",a,"b=",b,"c=",c
return