- 谁拿了最多奖学金
- 2009-11-05 09:21:09 @
type qq=(y,n); iiu=0..100; yu=0..10;
type studa=record
na:string[20];
ave:iiu;
ban:iiu;
ganbu,xi:char;
lun:yu;
zong: integer ;
end;
var stu:array[1..100] of studa;sum, k , d,i,t:integer;
nam:string[20];ch:char ;
begin
readln(k);
d:=0;
for i:= 1 to k do
begin
t:=0;
with stu[i] do
begin
read(ch);
na:='';
while ch' ' do
begin
na:=na+ ch;
read(ch);
end;
readln(ave,ban,ch,ganbu,ch,xi,lun);
if( ave>80 )and( lun >=1) then
t:=t+8000;
if (ave>85) and ( ban>80 )
then t:=t+4000;
if ave>90 then t:= t+2000;
if (ave>85) and (upcase (xi)= 'Y')
then t:=t+1000;
if (ban>80)and (upcase (ganbu)='Y' )
then t:=t+850;
zong:=t ;
end;
d:=d+stu[i].zong;
end;
begin
sum:=0;
for i:= 1 to k do
with stu[i] do
if stu[i].zong> sum then
begin
nam:=stu[i].na;
sum:=stu[i].zong;
end;
writeln(nam);
writeln(sum);
writeln(d);
end;
end.
1 条评论
-
howardhhm LV 8 @ 2009-11-05 12:50:27
难度不大
难度不大,自己再看看
- 1