Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted by mindaugas ( 15 years ago )
program Bevard1;
type asmuo=record
vard:string[10];
p:integer;
end;
mas=array[1..20] of asmuo;
var t:text;
mok:mas;
i,k,sum,maxe:integer;
vid:real;
v:string[10];
begin
assign(t,'duomenys.txt');
reset(t);
k:=0;
sum:=0;
while not eof(t) do
begin
k:=k+1;
readln(t,mok[k].vard,mok[k].p);
sum:=sum+mok[k].p;
end;
writeln('Sis mokinys turi didziausia pazymi: ');
for i:=1 to k-1 do
if mok[i].p > mok[i+1].p
then
begin
maxe:=i;
v:=mok[i].vard;
end;
writeln(v,' ', mok[maxe].p);
close(t);
readln;
Readln;
end.
Revise this Paste