Advertisement
electricmaster

highest

Jan 23rd, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.27 KB | None | 0 0
  1.  t[0] := 0;
  2.   t[1] := 0;
  3.   for i := 1 to length(data) do begin
  4.     if data[i].score > t[1] then begin
  5.       t[0] := i;
  6.       t[1] := data[i].score;
  7.     end;
  8.   end; // for
  9.   writeln('Congratulations to ', data[t[0]].name,' for having the highest score of ', t[1],'!');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement