Type tbank=record
name:string;
curs:real;
end;
var banks:array[1..15] of tbank;
max,dollars:real;
i,mi:longint;
Begin
Write('You have: ');
readln(dollars);
for i:=1 to 15 do Begin
Write('Bank name: ');
readln(banks[i].name);
write('Curs: ');
readln(banks[i].curs);
end;
max:=dollars*banks[1].curs;
mi:=1;
for i:=2 to 15 do
Begin
if(dollars*banks[i].curs>max) then Begin
max:=dollars*banks[i].curs;
mi:=i;
end;
end;
writeln('Best bank name: ',banks[mi].name,', curs is :',banks[mi].curs:2:2,', we will get: ',max:2:2,', rub.');
end.