pascal:1、program fs;var score:array[1..100] of real;num:array[1..100] of integer; i,j,n:integer;ave,s:real;begin read(n);for i:=1 to n do begin read(num,score);s:=s+score;end;ave:=s/n;for i:=1 to n do beginif score>ave then write(num,#32,'above',#32:5);if score=ave then write(num,#32,'equal',#32:5);if score<ave then write(num,#32,'below',#32:5);end;end. |