1.
clear
input"请输入要比较的数个数:"ton
dimea(n)
fori=1ton
input"第"+alltrim(str(i))+"个数:"toa(i)
endfor
storea(1)tomax,min
fori=2ton
ifmaxa(i)
t=min
min=a(i)
a(i)=t
endif
endfor
?"最大数是:",max
?"最小数是:",min
return
2.
clear
settalkoff
a=0
b=0
c=1
?a,b,c
fori=4to30
d=a+b+c
?d
a=b
b=c
c=d
endfor
settalkon
return