- 谁拿了最多奖学金
- 2009-06-29 21:45:24 @
type a=record
xm:string[20];
qm:0..100;
bj:0..100;
gb:char;
xb:char;
lw:0..10;
jj:longint;
end;
var stu:array[1..200] of a;
n,i,zjj,k,temp,j:longint;
c:char;
begin
readln(n);
for i:=1 to n do
with stu[i] do
begin
repeat
read(c);
xm:=xm+c;
inc(j);
until c=' ';
xm:=copy(xm,1,j-1);
read(qm,bj);
read(gb); read(gb);
read(xb); read(xb);
read(lw);
jj:=0;
readln;
end;
for i:=1 to n do
with stu[i] do
begin
if qm>80 then begin
if lw>=1 then jj:=jj+8000;
if qm>85 then begin
if bj>80 then jj:=jj+4000;
if xb='Y' then jj:=jj+1000;
if qm>90 then jj:=jj+2000;
end;
end;
if (bj>80) and (gb='Y') then jj:=jj+850;
end;
zjj:=0;
for i:=1 to 12 do
with stu[i] do
zjj:=zjj+jj;
temp:=0;
for i:=1 to 12 do
with stu[i] do
if jj>temp then begin
temp:=jj;
k:=i;
end;
with stu[k] do
begin
writeln(xm);
writeln(jj);
end;
writeln(zjj);
end.
为什么标准输入行是姓名
我的是奖学金呢?加了writeln后错误竟如出一辙