- 谁拿了最多奖学金
- 2009-06-03 22:14:39 @
program
victor(input,output);
var
n,i,h,max:longint;
a:array [1..100] of record
a,b,e,z:longint;
c,d:char;
m:string;
end;
t:char;
s,maxno:string;
begin
readln(n);
for i:=1 to n do
begin
with a[i] do
begin
readln(s);
m:=m+copy(s,1,pos(' ',s)-1);
delete(s,1,pos(' ',s));
val(copy(s,1,pos(' ',s)-1),a);
delete(s,1,pos(' ',s));
val(copy(s,1,pos(' ',s)-1),b);
delete(s,1,pos(' ',s));
c:=s[1];
delete(s,1,2);
d:=s[1];
delete(s,1,2);
val(s,e);
z:=ord((a>80) and (e>0))*8000+ord((a>85) and (b>80))*4000+ord(a>90)*2000+ord((a>85) and (d='Y'))*1000+ord((a>80) and (c='Y'))*850;
if z>max then
begin
max:=z;
maxno:=m;
end;
h:=h+z;
end;
end;
writeln(maxno);
writeln(max);
writeln(h);
end.
酬谢!
1 条评论
-
dlake LV 4 @ 2009-08-25 20:33:31
z:=ord((a>80) and (e>0))*8000+ord((a>85) and (b>80))*4000+ord(a>90)*2000+ord((a>85) and (d='Y'))*1000+ord((a>80) and (c='Y'))*850;
最后一个ord里面 期末成绩 改成班级评议
- 1