主题:各位帮我看看哪错了..
到输入那里,输入第一次就退出了....
type
alfa=packed array [1..15] of char;
student=record
name:alfa;
num:integer;
sex:(male,female);
age:6..50;
score:real;
end;
studenta=array [1..10] of student;
var
students:studenta;
i,mp,fp:integer;
se:char;
avea,aves:real;
begin
writeln('输入学号,性别,年龄,成绩,姓名');
for i:=1 to 10 do
with students[i] do
begin
readln(num,se,age,score,name);
if se='m'
then begin
sex:=male;
mp:=mp+1;
end
else begin
sex:=female;
fp:=fp+1;
end; {if}
avea:=avea+score;
aves:=aves+age;
end; {with}{for}
type
alfa=packed array [1..15] of char;
student=record
name:alfa;
num:integer;
sex:(male,female);
age:6..50;
score:real;
end;
studenta=array [1..10] of student;
var
students:studenta;
i,mp,fp:integer;
se:char;
avea,aves:real;
begin
writeln('输入学号,性别,年龄,成绩,姓名');
for i:=1 to 10 do
with students[i] do
begin
readln(num,se,age,score,name);
if se='m'
then begin
sex:=male;
mp:=mp+1;
end
else begin
sex:=female;
fp:=fp+1;
end; {if}
avea:=avea+score;
aves:=aves+age;
end; {with}{for}