输入数据是6个分数吧? 假设输入是这样的格式: 1 2 3 4 5 6 输入文件:input.txt 输出文件:output.txt 程序如下: program score; var max,min:longint; i:longint; total,v:longint; begin assign(input,'input.txt'); assign(output,'output.txt'); reset(input); rewrite(output); min:=11; max:=-1; for i:=1 to 6 do begin read(v); if max<v then max:=v; if min>v then min:=v; total:=total+v; end; total:=total-max-min; writeln(total); close(input); close(output); end.