vfp loop 嵌套错误

2025-05-06 08:41:27
推荐回答(1个)
回答1:

clear
s=0
input "请打分:" to x
if x>=0 and x<=10
s=s+x
max=x
min=x
for i=2 to 7
input "请打分:" to x
if x<0 or x>10
loop
endif
s=s+x
if x>max
max=x
endif
if x min=x
endif
next i
s=s-max-min
a=s/5
? "去掉最高分和最低分后,选手平均分是"+alltrim(str(a))

endif
loop应该放在循环里吧