*评分程序
set talk off
set decimals to 6
clear
store 0 to x,s
input "有多少评委?" to n
ln=len(alltr(str(n)))
dimension a(n)
for i=1 to n
a(i)=rand()*10
s=s+a(i)
??a(i)
x=x+1
if x%7=0
?
endif
endfor
store a(1) to ma,mi
for i=2 to n
if a(i) > ma
ma=a(i)
a=i
endif
if a(i) < mi
mi=a(i)
d=i
endif
endfor
s=(s-ma-mi)/(n-2)
?"最高分:"+str(ma,8,6)+" 位于:"+alltr(str(a,ln))," 最低分:"+str(mi,8,6)+" 位于:"+alltr(str(d,ln))
?"平均分数为:",s
?" 杨淼:0377-3297973"
set talk on *©80* |