vfp loop 嵌套错误

2025年05月06日 08:41
有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应该放在循环里吧