*vfp如何求6个数的第二最大值和第二最小值
**********************
dimension a(6)
clear
for i=1 to 6
?"请输入第"+str(i,1)+"个数:"
input to a(i)
endfor
asort(a) &&对数组元素排序(升序)
?"第二最大值是:",a(5)
?"第二最小值是:",a(2)
return
**********************
dimension a(6)
clear
for i=1 to 6
?"请输入第"+str(i,1)+"个数:"
input to a(i)
endfor
asort(a) &&对数组元素排序(升序)
?"第二最大值是:",a(5)
?"第二最小值是:",a(2)
return

感言:学以致用。 博客:http://www.bc-cn.net/blog/user14/65009/index.shtml email:Tiger5392@