急:求帮编一个VF小程序:“任给三个实数,求中间数”

来源:百度知道 编辑:UC知道 时间:2024/09/21 13:21:18
谢谢了,不胜感激!

是求在3个实数中排列中,中间的数?
dimension x(3)
input '数1:' to x(1)
input '数2:' to x(2)
input '数3:' to x(3)
for i=1 to 2
for j=i+1 to 3
if x(i)>x(j)
xxx=x(j)
x(j)=x(i)
x(i)=xxx
endif
endf
endf
?'中间数为:',x(2)

clear
input '数1:' to a
input '数2:' to b
input '数3:' to c
? '中间数为:',a+b+c-max(a,b,c)-min(a,b,c)

中间数是什么东西?是到三个数的距离都相等的数吗?好像没有那种数吧,只有到三个点距离都相等的点