1.
clear
input "请输入要比较的数个数:" to n
dime a(n)
for i=1 to n
input "第"+alltrim(str(i))+"个数:"to a(i)
endfor
store a(1) to max,min
for i=2 to n
if maxa(i)
t=min
min=a(i)
a(i)=t
endif
endfor
?"最大数是:",max
?"最小数是:",min
return
2.
clear
set talk off
a=0
b=0
c=1
?a,b,c
for i=4 to 30
d=a+b+c
?d
a=b
b=c
c=d
endfor
set talk on
return