输入值分别为3,3,6,5,1SET TALK OFF N=5INPUT 'A=' TO AS=AFOR I=1 TO N-1INPUT 'T=' TO TS=S+TIF T>AA=TENDIFENDFOR(S-A)/(N-1)SET TALK OFF(S-A)/(N-1)的值.

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 01:01:08
输入值分别为3,3,6,5,1SET TALK OFF N=5INPUT 'A=' TO AS=AFOR I=1 TO N-1INPUT 'T=' TO TS=S+TIF T>AA=TENDIFENDFOR(S-A)/(N-1)SET TALK OFF(S-A)/(N-1)的值.
xS_KP*M%imCoF@eKZl?@8:gNp+6MS'@L{K9~'[zrsHw ߥp2UdEdUֆlKT3MT%jzFKYBv 1T!8 9,6$b"[7 boT+&|e+eXY>$O'UvI]f̫ /gD9Y&Y&+` s> i։l[rJEËx(nO#V&p_RN)N'G{I'ąT!EΨ hH?0:_~pPp-2P0D4"c (ħT'Zvh}W_8D;Fb(ب'K3U ƧsNƻɭṄvu7 Ʀ|)<N^%k9-9 WS@2\hM=}c-

输入值分别为3,3,6,5,1SET TALK OFF N=5INPUT 'A=' TO AS=AFOR I=1 TO N-1INPUT 'T=' TO TS=S+TIF T>AA=TENDIFENDFOR(S-A)/(N-1)SET TALK OFF(S-A)/(N-1)的值.
输入值分别为3,3,6,5,1
SET TALK OFF
N=5
INPUT 'A=' TO A
S=A
FOR I=1 TO N-1
INPUT 'T=' TO T
S=S+T
IF T>A
A=T
ENDIF
ENDFOR
(S-A)/(N-1)
SET TALK OFF
(S-A)/(N-1)的值.

输入值分别为3,3,6,5,1SET TALK OFF N=5INPUT 'A=' TO AS=AFOR I=1 TO N-1INPUT 'T=' TO TS=S+TIF T>AA=TENDIFENDFOR(S-A)/(N-1)SET TALK OFF(S-A)/(N-1)的值.
n=5
a=3
s=3
for i=1 to 4 此时i=1 进入循环
t=3
s=3+3=6
if 3>3 条件假,执行endif下一条.i=2,回到for语句重新判断是否循环,
输入t的值, t=6
s=6+6=12
if 6>3 条件真,执行 a=6.再开始下一次循环,i=3,回到for语句重新判断是否循环,
输入t的值, t=5
s=12+5=17
if 5>6 条件假,再开始下一次循环,i=4,回到for语句重新判断是否循环,
输入t的值, t=1
s=17+1=18
if 1>6 条件假,再开始下一次循环,i=5,回到for语句重新判断是否循环,因为i的值超过了终值4,所以退出循环, 到输出语句:?(18-6)/(5-1),
结果是:3