/ Vijos / 讨论 / 分享 /

1001,我是新人,不太会用测评提交,这个哪里出错呢?

program schoolarship;

type

data=record

fname:string;

final:integer;

cmark:integer;

ganbu:char;

xibu:char;

lunwen:integer;

money:integer

end;

var

a:array[1..100]of data;

i,n,prime:integer;

k,sum:integer;

c:char;

function jiangjin(final,cmark,lunwen:integer;ganbu,xibu:char):integer;

var

sum:integer;

begin

sum:=0;

if (final>80)and(lunwen>0)then sum:=sum+8000;

if (final>85)and(cmark>80)then sum:=sum+4000;

if (final>90) then sum:=sum+2000;

if (final>85) and (xibu='Y')then sum:=sum+1000;

if (cmark>80) and (ganbu='Y') then sum:=sum+850;

jiangjin:=sum;

end;

procedure readin;

begin

readln(n);

for i:=1 to n do

begin

repeat

read(c);

a[i].fname:=a[i].fname+c;

until (c=' ');

read(a[i].final,a[i].cmark,c,a[i].ganbu,c,a[i].xibu,a[i].lunwen);

readln;

end;

end;

procedure process;

begin

for i:=1 to n do

a[i].money:=jiangjin(a[i].final,a[i].cmark,a[i].lunwen,a[i].ganbu,a[i].xibu);

k:=1;

for i:=2 to n do

if a[i].money>a[k].money then

k:=i;

for i:=1 to n do

sum:=sum+a[i].money;

writeln(a[k].fname);

writeln(a[k].money);

writeln(sum);

end;

begin

readin;

process;

readln;

end.

2 条评论

  • @ 2010-07-24 18:43:43

    不一定是Copy题解……

    我能说的是:读入写萎了……

  • @ 2010-07-24 14:45:19

    你的代码是复制的题解吗?

  • 1