program marklist;
type
student=record
no:string;
nam:string;
chinese:integer;
english:integer;
physics:integer;
chemistory:integer;
all:integer;
end;
var
a:array[1..n]of student;
b:array[i..n]of integer;
i,m,n,h,p,c,e:integer;pj:real;
begin
writeln('how many students?');
readln(n);
for i:=1to n do
with a[i] do begin
write('no'); read(no);
write('name'); read(nam);
write('chinese'); read(chinese);
write('math'); read(math);
write('english'); read(english);
write('physics'); read(physics);
write('chemistory'); read(chemistory);
end;
for i:=1 to n do
with a[i] do begin
all:=nam+chinese+english+physics+chemistory;
pj:=all/5;
b[i]:=all;
if chinese <60
then begin
write(no:5,nam:5,'chinese' :5,chinese:5);c:=c+1;
end;
if math <60
then begin
write(no:5,nam:5, 'math' :5,math:5);m:=m+1;
end;
if english <60
then begin write(no:5,nam:5,' english':5,english:5);e:=e+1;
end;
if physics <60
then begin write(no:5,nam:5,'physics' :5, physics:5);p:=p+1;
end;
if chemistory <60
then begin write(no:5,nam:5,' chemistory' :5, chemistory:5);h:=h+1;
end;
end;
end.
调试时显示compilation aborted,本人菜鸟,请高人指点