烦高手看看

type

student=record

name:string[16];

score1:integer;

score2:integer;

ganbu:char;

xibu:char;

lunwen:1..10;

money:longint;

end;

var

stu:array[1..100] of student;

temp:student;

i,n,mo:integer;

ch:char;

begin

readln(n);

for i:=1 to n do

with stu[i] do

begin

read(ch);

while ch' ' do

begin

name:=name+ch;

read(ch);

end;

read(score1);

read(score2);

read(ganbu,ganbu);

read(xibu,xibu);

readln(lunwen);

end;

for i:=1 to n do

begin

if (stu[i].score1>90) then stu[i].money:=stu[i].money+2000;

if (stu[i].score1>80)and(stu[i].lunwen>=1)then stu[i].money:=stu[i].money+8000;

if (stu[i].score1>85)and(stu[i].score2>=80)then stu[i].money:=stu[i].money+4000;

if (stu[i].score1>85)and(stu[i].xibu='Y')then stu[i].money:=stu[i].money+1000;

if (stu[i].score2>80)and(stu[i].ganbu='Y')then stu[i].money:=stu[i].money+850;

end;

for i:=1 to n do

if stu[i].money>temp.money then temp:=stu[i];

writeln(temp.name);

writeln(temp.money);

for i:=1 to n do

with stu[i] do

mo:=money+mo;

write(mo);

end.

0 条评论

目前还没有评论...

信息

ID
1001
难度
5
分类
模拟 点击显示
标签
递交数
39100
已通过
12719
通过率
33%
被复制
121
上传者