StopwatchLaz Code

The full code (4000+ lines) of StopwatchLaz

program StopwatchLaz;
{
    Copyright (c) 2011 Daniel Lever
    
    Licensed under the Apache License, Version 2.0 (the "License"); you may not 
    use this file except in compliance with the License, as described at
    http://www.apache.org/licenses/ and http://www.pp4s.co.uk/licenses/
}


{$APPTYPE CONSOLE}
{Needs to be run in Lazarus}

uses 
  SysUtils, windows, CRT;

var 
  noofpeople, laps : integer;
  timea : array [1..30] of tdatetime;
  realinterval2, mille : real;
  intinterval2, response, answer, a, b, c, d, e, f, g, h : integer;
  key2 : char;
  Stroke: string;

procedure lane1(stroke:string) ;
begin
  timea[2] := time;
  realinterval2 := timea[2] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[2] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (1,3);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk'  then
    begin
      if intinterval2 < 24 then
        begin
          gotoxy (8,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 19 then
        begin
          gotoxy (8,8);
          if stroke = 'br' then
            begin
              if intinterval2 < 27 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Bronze award');
                end;
              if intinterval2 < 23 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Silver Award');
                end;
              if intinterval2 < 21 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Gold Award');
                end;
            end;
          if stroke = 'bf' then
            begin
              if intinterval2 < 23 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Bronze award');
                end;
              if intinterval2 < 20 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Silver Award');
                end;
              if intinterval2 < 18 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Gold Award');
                end;
            end;
          if stroke = 'fc' then
            begin
              if intinterval2 < 21 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Bronze award');
                end;
              if intinterval2 < 18 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Silver Award');
                end;
              if intinterval2 < 16 then
                begin
                  gotoxy (8,8);
                  clreol;
                  writeln('Gold Award');
                end;
            end;
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane2(stroke:string) ;
begin
  timea[3] := time  ;
  realinterval2 := timea[3] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[3] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (13,3);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 24 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 19 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 27 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 23 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 23 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 20 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 21 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 16 then
        begin
          gotoxy (8,9);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane3(stroke:string);
begin
  timea[4] := time  ;
  realinterval2 := timea[4] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[4] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (25,3);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 24 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 19 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 27 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 23 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 23 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 20 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 21 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 16 then
        begin
          gotoxy (8,10);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane4(stroke:string);
begin
  timea[5] := time  ;
  realinterval2 := timea[5] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[5] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (37,3);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 24 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 19 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 27 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 23 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 23 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 20 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 21 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 16 then
        begin
          gotoxy (8,11);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane5(stroke:string);
begin
  timea[6] := time;
  realinterval2 := timea[6] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[6] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (49,3);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 24 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 19 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 27 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 23 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 23 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 20 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 21 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 16 then
        begin
          gotoxy (8,12);
          clreol;
          writeln('Gold Award');
        end;
    end;
end ;
procedure lane6(stroke:string);
begin
  timea[7] := time;
  realinterval2 := timea[7] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[7] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (61,3);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 24 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 19 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 27 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 23 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 23 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 20 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 21 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 16 then
        begin
          gotoxy (8,13);
          clreol;
          writeln('Gold Award');
        end;
    end;
end ;
procedure lane7(stroke:string);
begin
  timea[10] := time;
  realinterval2 := timea[10] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[10] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (73,3);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 24 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 19 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 27 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 23 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 23 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 20 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 21 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 16 then
        begin
          gotoxy (8,14);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane8(stroke:string);
begin
  timea[26] := time  ;
  realinterval2 := timea[26] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[26] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (85,3);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 24 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 19 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 27 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 23 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 21 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 23 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 20 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 21 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 18 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 16 then
        begin
          gotoxy (8,15);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane11(stroke:string);
begin
  timea[27] := time;
  realinterval2 := timea[27] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[27] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (1,4);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 54 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 47 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 43 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 60 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 52 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 48 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 52 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 45 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 47 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 37 then
        begin
          gotoxy (22,8);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane21(stroke:string);
begin
  timea[11] := time  ;
  realinterval2 := timea[11] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[11] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (13,4);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 54 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 47 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 43 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 60 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 52 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 48 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 52 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 45 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 47 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 37 then
        begin
          gotoxy (22,9);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane31(stroke:string);
begin
  timea[12] := time;
  realinterval2 := timea[12] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[12] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (25,4);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 54 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 47 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 43 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 60 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 52 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 48 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 52 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 45 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 47 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 37 then
        begin
          gotoxy (22,10);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane41(stroke:string);
begin
  timea[13] := time;
  realinterval2 := timea[13] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[13] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (37,4);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 54 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 47 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 43 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 60 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 52 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 48 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 52 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 45 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 47 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 37 then
        begin
          gotoxy (22,11);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane51(stroke:string);
begin
  timea[14] := time;
  realinterval2 := timea[14] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[14] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (49,4);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 54 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 47 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 43 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 60 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 52 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 48 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 52 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 45 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 47 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 37 then
        begin
          gotoxy (22,12);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane61(stroke:string);
begin
  timea[15] := time;
  realinterval2 := timea[15] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[15] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (61,4);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 54 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 47 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 43 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 60 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 52 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 48 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 52 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 45 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 47 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 37 then
        begin
          gotoxy (22,13);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane71(stroke:string);
begin
  timea[16] := time  ;
  realinterval2 := timea[16] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[16] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (73,4);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 54 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 47 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 43 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 60 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 52 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 48 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 52 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 45 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 47 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 37 then
        begin
          gotoxy (22,14);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane81(stroke:string);
begin
  timea[17] := time;
  realinterval2 := timea[17] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[17] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (85,4);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 54 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 47 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 43 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 60 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 52 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 48 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 52 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 45 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Gold Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 47 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 41 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 37 then
        begin
          gotoxy (22,15);
          clreol;
          writeln('Gold Award');
        end;
    end;
end;
procedure lane12(stroke:string);
begin
  timea[18] := time  ;
  realinterval2 := timea[18] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[18] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (1,5);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 114 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 101 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 92 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 85 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 141 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 115 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 104 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 97 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 113 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 99 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 90 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 83 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 104 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 91 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 82 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 76 then
        begin
          gotoxy (36,8);
          clreol;
          writeln('Platinum Award');
        end;
    end;
end;
procedure lane22(stroke:string);
begin
  timea[19] := time;
  realinterval2 := timea[19] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[19] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (13,5);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 114 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 101 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 92 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 85 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 141 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 115 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 104 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 97 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 113 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 99 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 90 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 83 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 104 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 91 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 82 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 76 then
        begin
          gotoxy (36,9);
          clreol;
          writeln('Platinum Award');
        end;
    end;
end;
procedure lane32(stroke:string);
begin
  timea[20] := time  ;
  realinterval2 := timea[20] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[20] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (25,5);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 114 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 101 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 92 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 85 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 141 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 115 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 104 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 97 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 113 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 99 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 90 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 83 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 104 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 91 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 82 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 76 then
        begin
          gotoxy (36,10);
          clreol;
          writeln('Platinum Award');
        end;
    end;
end;
procedure lane42(stroke:string);
begin
  timea[21] := time;
  realinterval2 := timea[21] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[21] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (37,5);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 114 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 101 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 92 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 85 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 141 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 115 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 104 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 97 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 113 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 99 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 90 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 83 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 104 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 91 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 82 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 76 then
        begin
          gotoxy (36,11);
          clreol;
          writeln('Platinum Award');
        end;
    end;
end;
procedure lane52(stroke:string);
begin
  timea[22] := time  ;
  realinterval2 := timea[22] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[22] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (49,5);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 114 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 101 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 92 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 85 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 141 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 115 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 104 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 97 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 113 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 99 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 90 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 83 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 104 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 91 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 82 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 76 then
        begin
          gotoxy (36,12);
          clreol;
          writeln('Platinum Award');
        end;
    end;
end;
procedure lane62(stroke:string);
begin
  timea[23] := time;
  realinterval2 := timea[23] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[23] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (61,5);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 114 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 101 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 92 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 85 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 141 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 115 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 104 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 97 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 113 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 99 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 90 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 83 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 104 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 91 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 82 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 76 then
        begin
          gotoxy (36,13);
          clreol;
          writeln('Platinum Award');
        end;
    end;
end;
procedure lane72(stroke:string);
begin
  timea[24] := time;
  realinterval2 := timea[24] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[24] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (73,5);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 114 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 101 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 92 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 85 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 141 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 115 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 104 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 97 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 113 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 99 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 90 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 83 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 104 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 91 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 82 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 76 then
        begin
          gotoxy (36,14);
          clreol;
          writeln('Platinum Award');
        end;
    end;
end;
procedure lane82(stroke:string);
begin
  timea[25] := time  ;
  realinterval2 := timea[25] - timea[1];
  realinterval2 := realinterval2 * (24 * 60 * 60);
  intinterval2 :=  trunc(realinterval2);
  mille := timea[25] - timea[1];
  mille := mille * (24 * 60 * 1000 * 60);
  mille := mille - (intinterval2 *1000);
  answer := trunc(mille);
  gotoxy (85,5);
  writeln (intinterval2, '.', answer, ' secs' );
  if stroke = 'bk' then
    begin
      if intinterval2 < 114 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 101 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 92 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 85 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'br' then
    begin
      if intinterval2 < 141 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 115 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 104 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 97 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'bf' then
    begin
      if intinterval2 < 113 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 99 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 90 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 83 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Platinum Award');
        end;
    end;
  if stroke = 'fc' then
    begin
      if intinterval2 < 104 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Bronze award');
        end;
      if intinterval2 < 91 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Silver Award');
        end;
      if intinterval2 < 82 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Gold Award');
        end;
      if intinterval2 < 76 then
        begin
          gotoxy (36,15);
          clreol;
          writeln('Platinum Award');
        end;
    end;
end;
procedure go;
begin
  writeln ('The race will start in 3');
  sleep(2000);
  clrscr;
  writeln('2');
  sleep(1000);
  clrscr;
  writeln('1');
  sleep(1000);
  clrscr;
  writeln('GO!');
  sleep(1000);
  clrscr;
end;
procedure race;
begin
  sleep(1000);
  writeln('How many people will be in the race? (1-8)');
  readln(noofpeople);
end;
procedure lanes;
begin
  gotoxy (1,2);
  writeln('lane 1');
  gotoxy (13,2);
  writeln('lane 2');
  gotoxy (25,2);
  writeln('lane 3');
  gotoxy (37,2);
  writeln('lane 4');
  gotoxy (49,2);
  writeln('lane 5');
  gotoxy (61,2);
  writeln('lane 6');
  gotoxy (73,2);
  writeln('lane 7');
  gotoxy (85,2);
  writeln('lane 8');
end;
procedure length1;
begin
  gotoxy(97,3);
  writeln('1st length');
end ;
procedure length2;
begin
  gotoxy(97,3) ;
  writeln('1st length');
  gotoxy(97,4)  ;
  writeln('2nd length');
end;
procedure length4;
begin
  gotoxy(97,3)  ;
  writeln('1st length');
  gotoxy(97,4)  ;
  writeln('2nd length');
  gotoxy(97,5) ;
  writeln('3rd length');
end;
procedure Awards;
begin
  gotoxy(1,6);
  writeln('Speed');
  gotoxy(1,7);
  writeln('Awards');
  gotoxy(1,8);
  writeln('Lane1: ');
  gotoxy(1,9);
  writeln('Lane2: ');
  gotoxy(1,10);
  writeln('Lane3: ');
  gotoxy(1,11);
  writeln('Lane4: ');
  gotoxy(1,12);
  writeln('Lane5: ');
  gotoxy(1,13);
  writeln('Lane6: ');
  gotoxy(1,14);
  writeln('Lane7: ');
  gotoxy(1,15);
  writeln('Lane8: ');
  gotoxy(8,7);
  writeln('length 1');
  gotoxy(22,7);
  writeln('Length 2');
  gotoxy(36,7);
  writeln('Length 3');
end;
procedure stroke1;
begin
  writeln('please enter the stroke which is going to be swum');
  readln(stroke);
end;

{$IFDEF WINDOWS}{$R Stopwatchlaz.rc}{$ENDIF}

begin
  writeln('Welcome to the stopwatch');
  sleep(1000);
  writeln ('What would you like to do?');
  writeln ('1. Play stopwatch');
  writeln ('2. Read instructions on how to use');
  readln (response);
  case response of 
    1:
       begin
         writeln('How may laps are there going to be (25m pool)(1, 2 or 4)');
         readln(laps);
         case laps of 
           1:
              begin
                writeln('There will be 1 lap (25m)');
                race;
                case noofpeople of 
                  2:
                     begin
                       writeln('There will be 2 people');
                       stroke1;
                       go;
                       timea[1] := time;
                       lanes;
                       length1;
                       key2 := readkey;
                       Awards;
                       repeat
                         if key2 = '4' then
                           begin
                             lane4(stroke) ;
                           end;

                         if key2 = '5' then
                           begin
                             lane5(stroke);
                           end;
                         key2 := readkey;
                       until key2 = 'x'
                     end;
                  3:
                     begin
                       writeln('There will be 3 people');
                       stroke1;
                       go;
                       timea[1] := time;
                       lanes;
                       length1;
                       key2 := readkey;
                       Awards;
                       repeat
                         if key2 = '3' then
                           begin
                             lane3(stroke);
                           end;
                         if key2 = '4' then
                           begin
                             lane4(stroke) ;
                           end;
                         if key2 = '5' then
                           begin
                             lane5(stroke);
                           end;
                         key2 := readkey;
                       until key2 = 'x'
                     end;
                  4:
                     begin
                       writeln('There will be 4 people');
                       stroke1;
                       go;
                       timea[1] := time;
                       lanes;
                       length1;
                       key2 := readkey;
                       Awards;
                       repeat
                         if key2 = '3' then
                           begin
                             lane3(stroke);
                           end;
                         if key2 = '4' then
                           begin
                             lane4(stroke) ;
                           end;
                         if key2 = '5' then
                           begin
                             lane5(stroke);
                           end;
                         if key2 = '6' then
                           begin
                             lane6(stroke);
                           end;
                         key2 := readkey;
                       until key2 = 'x'
                     end;
                  5:
                     begin
                       writeln('There will be 5 people');
                       stroke1;
                       go;
                       timea[1] := time;
                       lanes;
                       length1;
                       key2 := readkey;
                       Awards;
                       repeat
                         if key2 = '2' then
                           begin
                             lane2(stroke);
                           end;
                         if key2 = '3' then
                           begin
                             lane3(stroke);
                           end;
                         if key2 = '4' then
                           begin
                             lane4(stroke) ;
                           end;
                         if key2 = '5' then
                           begin
                             lane5(stroke);
                           end;
                         if key2 = '6' then
                           begin
                             lane6(stroke);
                           end;
                         key2 := readkey;
                       until key2 = 'x'
                     end;
                  6:
                     begin
                       writeln('There will be 6 people');
                       stroke1;
                       go;
                       timea[1] := time;
                       length1;
                       lanes;
                       key2 := readkey;
                       Awards;
                       repeat
                         if key2 = '2' then
                           begin
                             lane2(stroke);
                           end;
                         if key2 = '3' then
                           begin
                             lane3(stroke);
                           end;
                         if key2 = '4' then
                           begin
                             lane4(stroke) ;
                           end;
                         if key2 = '5' then
                           begin
                             lane5(stroke);
                           end;
                         if key2 = '6' then
                           begin
                             lane6(stroke);
                           end;
                         if key2 = '7' then
                           begin
                             lane7(stroke);
                           end;
                         key2 := readkey;
                       until key2 = 'x'
                     end;
                  7:
                     begin
                       writeln('There will be 7 people');
                       stroke1;
                       go;
                       timea[1] := time;
                       lanes;
                       length1;
                       key2 := readkey;
                       Awards;
                       repeat
                         if key2 = '1' then
                           begin
                             lane1(stroke);
                           end;
                         if key2 = '2' then
                           begin
                             lane2(stroke);
                           end;
                         if key2 = '3' then
                           begin
                             lane3(stroke);
                           end;
                         if key2 = '4' then
                           begin
                             lane4(stroke) ;
                           end;
                         if key2 = '5' then
                           begin
                             lane5(stroke);
                           end;
                         if key2 = '6' then
                           begin
                             lane6(stroke);
                           end;
                         if key2= '7' then
                           begin
                             lane7(stroke);
                           end;
                         key2 := readkey;
                       until key2 = 'x'
                     end;
                  8:
                     begin
                       writeln('There will be 8 people');
                       stroke1;
                       go;
                       lanes;
                       length1;
                       timea[1] := time;
                       key2 := readkey ;
                       Awards;

                       repeat
                         if key2 = '1' then
                           begin
                             lane1(stroke);
                           end;
                         if key2 = '2' then
                           begin
                             lane2(stroke);
                           end;
                         if key2 = '3' then
                           begin
                             lane3(stroke);
                           end;
                         if key2 = '4' then
                           begin
                             lane4(stroke) ;
                           end;
                         if key2 = '5' then
                           begin
                             lane5(stroke);
                           end;
                         if key2 = '6' then
                           begin
                             lane6(stroke);
                           end;
                         if key2= '7' then
                           begin
                             lane7(stroke);
                           end;
                         if key2 = '8' then
                           begin
                             lane8(stroke);
                           end;
                         key2 := readkey;
                       until key2 = 'x'
                     end;
                end;

              end;
           2:
              begin
                writeln('there will be 2 laps (50m)');
                begin
                  race;
                  case noofpeople of 
                    2:
                       begin
                         writeln('There will be 2 people');
                         stroke1;
                         go;
                         timea[1] := time;
                         lanes;
                         length2;
                         awards;
                         d := 0 ;
                         e := 0;
                         key2 := readkey ;
                         repeat
                           if key2 = '4' then
                             begin
                               if d=0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d+1;
                                 end
                               else
                                 if d=1 then
                                   begin
                                     lane41(stroke);
                                     d := d + 1
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e=0 then
                                 begin
                                   lane5(stroke);
                                   e := e + 1;
                                 end
                               else
                                 if e=1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    3:
                       begin
                         writeln('There will be 3 people');
                         stroke1;
                         go;
                         timea[1] := time;
                         lanes;
                         length2;
                         awards;
                         c := 0;
                         d := 0;
                         e := 0;
                         key2 := readkey ;
                         repeat
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke);
                                   c := c +1 ;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);;
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d=0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d+1;
                                 end
                               else
                                 if d=1 then
                                   begin
                                     lane41(stroke); ;
                                     d := d + 1;
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e=0 then
                                 begin
                                   lane5(stroke);
                                   e := e + 1;
                                 end
                               else
                                 if e=1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end;
                             end;
                           key2 := readkey;
                         until 
                               key2 = 'x'
                       end;
                    4:
                       begin
                         writeln('There will be 4 people');
                         stroke1;
                         go;
                         lanes;
                         length2;
                         timea[1] := time;
                         key2 := readkey ;
                         awards;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         repeat
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke);
                                   c := c +1 ;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);;
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d=0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d+1;
                                 end
                               else
                                 if d=1 then
                                   begin
                                     lane41(stroke); ;
                                     d := d + 1
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e=0 then
                                 begin
                                   lane5(stroke);
                                   e := e + 1;
                                 end
                               else
                                 if e=1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke);
                                   f := f + 1
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    5:
                       begin
                         writeln('There will be 5 people');
                         stroke1;
                         go;
                         lanes;
                         length2;
                         timea[1] := time;
                         key2 := readkey ;
                         awards;
                         b := 0;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         repeat
                           if key2 = '2' then
                             begin
                               if b = 0 then
                                 begin
                                   lane2(stroke);
                                   b := b + 1;
                                 end
                               else
                                 if b = 1 then
                                   begin
                                     lane21(stroke);
                                     b := b + 1;
                                   end;
                             end;
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke);
                                   c := c +1 ;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d=0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d+1;
                                 end
                               else
                                 if d=1 then
                                   begin
                                     lane41(stroke); ;
                                     d := d + 1
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e=0 then
                                 begin
                                   lane5(stroke);
                                   e := e + 1;
                                 end
                               else
                                 if e=1 then
                                   begin
                                     lane51(stroke);
                                     e := e + 1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke);
                                   f := f + 1
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    6:
                       begin
                         writeln('There will be 6 people');
                         stroke1;
                         go;
                         lanes;
                         length2;
                         timea[1] := time;
                         key2 := readkey ;
                         awards;
                         b := 0;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         g := 0;
                         repeat
                           if key2 = '2' then
                             begin
                               if b = 0 then
                                 begin
                                   lane2(stroke);
                                   b := b + 1;
                                 end
                               else
                                 if b = 1 then
                                   begin
                                     lane21(stroke)  ;
                                     b := b + 1;
                                   end;
                             end;
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke);
                                   c := c   +1 ;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d=0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d+1;
                                 end
                               else
                                 if d=1 then
                                   begin
                                     lane41(stroke);
                                     d := d + 1
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e=0 then
                                 begin
                                   lane5(stroke);
                                   e := e + 1;
                                 end
                               else
                                 if e=1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke);
                                   f := f + 1
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           if key2 = '7' then
                             begin
                               if g=0 then
                                 begin
                                   lane7(stroke);
                                   g := g + 1;
                                 end
                               else
                                 if g =1 then
                                   begin
                                     lane71(stroke);
                                     g := g + 1
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    7:
                       begin
                         writeln('There will be 7 people');
                         stroke1;
                         go;
                         lanes;
                         length2;
                         timea[1] := time;
                         key2 := readkey;
                         awards;
                         a := 0;
                         b := 0;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         g := 0;
                         repeat
                           if key2 = '1' then
                             begin
                               if a = 0 then
                                 begin
                                   lane1(stroke);
                                   a := a + 1;
                                 end
                               else
                                 if a = 1 then
                                   begin
                                     lane11(stroke);
                                     a := a+1;
                                   end;
                             end;
                           if key2 = '2' then
                             begin
                               if b = 0 then
                                 begin
                                   lane2(stroke);
                                   b := b + 1;
                                 end
                               else
                                 if b = 1 then
                                   begin
                                     lane21(stroke)  ;
                                     b := b + 1;
                                   end;
                             end;
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke);
                                   c := c +1 ;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);;
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d=0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d+1;
                                 end
                               else
                                 if d=1 then
                                   begin
                                     lane41(stroke); ;
                                     d := d + 1
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e=0 then
                                 begin
                                   lane5(stroke);
                                   e := e + 1;
                                 end
                               else
                                 if e=1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke);
                                   f := f + 1
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           if key2 = '7' then
                             begin
                               if g=0 then
                                 begin
                                   lane7(stroke);
                                   g := g + 1;
                                 end
                               else
                                 if g =1 then
                                   begin
                                     lane71(stroke);
                                     g := g + 1
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    8:
                       begin
                         writeln('There will be 8 people');
                         stroke1;
                         go;
                         lanes;
                         length2;
                         timea[1] := time;
                         key2 := readkey;
                         awards;
                         a := 0;
                         b := 0;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         g := 0;
                         h := 0;
                         repeat
                           if key2 = '1' then
                             begin
                               if a = 0 then
                                 begin
                                   lane1(stroke);
                                   a := a + 1;
                                 end
                               else
                                 if a = 1 then
                                   begin
                                     lane11(stroke);
                                     a := a+1;
                                   end;
                             end;
                           if key2 = '2' then
                             begin
                               if b = 0 then
                                 begin
                                   lane2(stroke);
                                   b := b + 1;
                                 end
                               else
                                 if b = 1 then
                                   begin
                                     lane21(stroke)  ;
                                     b := b + 1;
                                   end;
                             end;
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke);
                                   c := c +1 ;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);;
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d=0 then
                                 begin
                                   lane4(stroke);
                                   d := d+1;
                                 end
                               else
                                 if d=1 then
                                   begin
                                     lane41(stroke); ;
                                     d := d + 1
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e=0 then
                                 begin
                                   lane5(stroke);
                                   e := e + 1;
                                 end
                               else
                                 if e=1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke);
                                   f := f + 1
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           if key2 = '7' then
                             begin
                               if g=0 then
                                 begin
                                   lane7(stroke);
                                   g := g + 1;
                                 end
                               else
                                 if g =1 then
                                   begin
                                     lane71(stroke);
                                     g := g + 1
                                   end;
                             end;
                           if key2 = '8' then
                             begin
                               if h = 0 then
                                 begin
                                   lane8(stroke);
                                   h := h +1;
                                 end
                               else
                                 if h = 1 then
                                   begin
                                     lane81(stroke);
                                     h := h + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                  end;
                end;
              end;
           4:
              begin
                writeln('There will be 4 laps (100m)');
                begin
                  race;
                  case noofpeople of 
                    2:
                       begin
                         writeln('There will be 2 people');
                         stroke1;
                         d := 0;
                         e := 0;
                         go;
                         lanes;
                         length4;
                         timea[1] := time;
                         key2 := readkey;
                         Awards;
                         repeat
                           if key2 = '4' then
                             begin
                               if d = 0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d + 1;
                                 end
                               else
                                 if d = 1 then
                                   begin
                                     lane41(stroke);
                                     d := d+1;
                                   end
                               else
                                 if d = 2 then
                                   begin
                                     lane42(stroke);
                                     d := d + 1;
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e = 0 then
                                 begin
                                   lane5(stroke) ;
                                   e := e + 1;
                                 end
                               else
                                 if e = 1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end
                               else
                                 if d = 2 then
                                   begin
                                     lane52(stroke);
                                     e := e + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    3:
                       begin
                         writeln('There will be 3 people');
                         go;
                         lanes;
                         length4;
                         timea[1] := time;
                         key2 := readkey;
                         c := 0;
                         d := 0;
                         e := 0;
                         repeat
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke) ;
                                   c := c + 1;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);;
                                     c := c+1;
                                   end
                               else
                                 if c = 2 then
                                   begin
                                     lane32(stroke);
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d = 0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d + 1;
                                 end
                               else
                                 if d = 1 then
                                   begin
                                     lane41(stroke);;
                                     d := d+1;
                                   end
                               else
                                 if d = 2 then
                                   begin
                                     lane42(stroke);
                                     d := d + 1;
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e = 0 then
                                 begin
                                   lane5(stroke) ;
                                   e := e + 1;
                                 end
                               else
                                 if e = 1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end
                               else
                                 if e = 2 then
                                   begin
                                     lane52(stroke);
                                     e := e + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    4:
                       begin
                         writeln('There will be 4 people');
                         go;
                         lanes;
                         length4;
                         timea[1] := time;
                         key2 := readkey;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         repeat
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke) ;
                                   c := c + 1;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);;
                                     c := c+1;
                                   end
                               else
                                 if c = 2 then
                                   begin
                                     lane32(stroke);
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d = 0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d + 1;
                                 end
                               else
                                 if d = 1 then
                                   begin
                                     lane41(stroke);;
                                     d := d+1;
                                   end
                               else
                                 if d = 2 then
                                   begin
                                     lane42(stroke);
                                     d := d + 1;
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e = 0 then
                                 begin
                                   lane5(stroke) ;
                                   e := e + 1;
                                 end
                               else
                                 if e = 1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end
                               else
                                 if e = 2 then
                                   begin
                                     lane52(stroke);
                                     e := e + 1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke) ;
                                   f := f + 1;
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f+1;
                                   end
                               else
                                 if f = 2 then
                                   begin
                                     lane62(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    5:
                       begin
                         writeln('There will be 5 people');
                         go;
                         lanes;
                         length4;
                         timea[1] := time;
                         key2 := readkey;
                         b := 0;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         repeat
                           if key2 = '2' then
                             begin
                               if b = 0 then
                                 begin
                                   lane2(stroke) ;
                                   b := b + 1;
                                 end
                               else
                                 if b = 1 then
                                   begin
                                     lane21(stroke);
                                     b := b+1;
                                   end
                               else
                                 if b = 2 then
                                   begin
                                     lane22(stroke);
                                     b := b + 1;
                                   end;
                             end;
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke) ;
                                   c := c + 1;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);;
                                     c := c+1;
                                   end
                               else
                                 if c = 2 then
                                   begin
                                     lane32(stroke);
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d = 0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d + 1;
                                 end
                               else
                                 if d = 1 then
                                   begin
                                     lane41(stroke);;
                                     d := d+1;
                                   end
                               else
                                 if d = 2 then
                                   begin
                                     lane42(stroke);
                                     d := d + 1;
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e = 0 then
                                 begin
                                   lane5(stroke) ;
                                   e := e + 1;
                                 end
                               else
                                 if e = 1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end
                               else
                                 if e = 2 then
                                   begin
                                     lane52(stroke);
                                     e := e + 1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke) ;
                                   f := f + 1;
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f+1;
                                   end
                               else
                                 if f = 2 then
                                   begin
                                     lane62(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    6:
                       begin
                         writeln('There will be 6 people');
                         go;
                         lanes;
                         length4;
                         timea[1] := time;
                         key2 := readkey;
                         b := 0;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         g := 0;
                         repeat
                           if key2 = '2' then
                             begin
                               if b = 0 then
                                 begin
                                   lane2(stroke) ;
                                   b := b + 1;
                                 end
                               else
                                 if b = 1 then
                                   begin
                                     lane21(stroke);
                                     b := b+1;
                                   end
                               else
                                 if b = 2 then
                                   begin
                                     lane22(stroke);
                                     b := b + 1;
                                   end;
                             end;
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke) ;
                                   c := c + 1;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);;
                                     c := c+1;
                                   end
                               else
                                 if c = 2 then
                                   begin
                                     lane32(stroke);
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d = 0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d + 1;
                                 end
                               else
                                 if d = 1 then
                                   begin
                                     lane41(stroke);;
                                     d := d+1;
                                   end
                               else
                                 if d = 2 then
                                   begin
                                     lane42(stroke);
                                     d := d + 1;
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e = 0 then
                                 begin
                                   lane5(stroke) ;
                                   e := e + 1;
                                 end
                               else
                                 if e = 1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end
                               else
                                 if e = 2 then
                                   begin
                                     lane52(stroke);
                                     e := e + 1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke) ;
                                   f := f + 1;
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f+1;
                                   end
                               else
                                 if f = 2 then
                                   begin
                                     lane62(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           if key2 = '7' then
                             begin
                               if g = 0 then
                                 begin
                                   lane7(stroke);
                                   g := g + 1;
                                 end
                               else
                                 if g = 1 then
                                   begin
                                     lane71(stroke);
                                     g := g+1;
                                   end
                               else
                                 if g = 2 then
                                   begin
                                     lane72(stroke);
                                     g := g + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    7:
                       begin
                         writeln('There will be 7 people');
                         go;
                         lanes;
                         length4;
                         timea[1] := time;
                         key2 := readkey;
                         a := 0;
                         b := 0;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         g := 0;
                         repeat
                           if key2 = '1' then
                             begin
                               if a = 0 then
                                 begin
                                   lane1(stroke) ;
                                   a := a + 1;
                                 end
                               else
                                 if a = 1 then
                                   begin
                                     lane11(stroke);
                                     a := a + 1;
                                   end
                               else
                                 if a = 2 then
                                   begin
                                     lane12(stroke);
                                     a := a + 1;
                                   end;
                             end;
                           if key2 = '2' then
                             begin
                               if b = 0 then
                                 begin
                                   lane2(stroke) ;
                                   b := b + 1;
                                 end
                               else
                                 if b = 1 then
                                   begin
                                     lane21(stroke);
                                     b := b + 1;
                                   end
                               else
                                 if b = 2 then
                                   begin
                                     lane22(stroke);
                                     b := b + 1;
                                   end;
                             end;
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke) ;
                                   c := c + 1;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);
                                     c := c + 1;
                                   end
                               else
                                 if c = 2 then
                                   begin
                                     lane32(stroke);
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d = 0 then
                                 begin
                                   lane4(stroke);
                                   d := d + 1;
                                 end
                               else
                                 if d = 1 then
                                   begin
                                     lane41(stroke);
                                     d := d + 1;
                                   end
                               else
                                 if d = 2 then
                                   begin
                                     lane42(stroke);
                                     d := d + 1;
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e = 0 then
                                 begin
                                   lane5(stroke) ;
                                   e := e + 1;
                                 end
                               else
                                 if e = 1 then
                                   begin
                                     lane51(stroke);
                                     e := e + 1;
                                   end
                               else
                                 if e = 2 then
                                   begin
                                     lane52(stroke);
                                     e := e + 1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke);
                                   f := f + 1;
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f + 1;
                                   end
                               else
                                 if f = 2 then
                                   begin
                                     lane62(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           if key2 = '7' then
                             begin
                               if g = 0 then
                                 begin
                                   lane7(stroke) ;
                                   g := g + 1;
                                 end
                               else
                                 if g = 1 then
                                   begin
                                     lane71(stroke);
                                     g := g + 1;
                                   end
                               else
                                 if g = 2 then
                                   begin
                                     lane72(stroke);
                                     g := g + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                    8:
                       begin
                         writeln('There will be 8 people');
                         go;
                         lanes;
                         length4;
                         timea[1] := time;
                         key2 := readkey;
                         a := 0;
                         b := 0;
                         c := 0;
                         d := 0;
                         e := 0;
                         f := 0;
                         g := 0;
                         repeat
                           if key2 = '1' then
                             begin
                               if a = 0 then
                                 begin
                                   lane1(stroke) ;
                                   a := a + 1;
                                 end
                               else
                                 if a = 1 then
                                   begin
                                     lane11(stroke);
                                     a := a + 1;
                                   end
                               else
                                 if a = 2 then
                                   begin
                                     lane12(stroke);
                                     a := a + 1;
                                   end;
                             end;
                           if key2 = '2' then
                             begin
                               if b = 0 then
                                 begin
                                   lane2(stroke) ;
                                   b := b + 1;
                                 end
                               else
                                 if b = 1 then
                                   begin
                                     lane21(stroke);
                                     b := b + 1;
                                   end
                               else
                                 if b = 2 then
                                   begin
                                     lane22(stroke);
                                     b := b + 1;
                                   end;
                             end;
                           if key2 = '3' then
                             begin
                               if c = 0 then
                                 begin
                                   lane3(stroke) ;
                                   c := c + 1;
                                 end
                               else
                                 if c = 1 then
                                   begin
                                     lane31(stroke);
                                     c := c + 1;
                                   end
                               else
                                 if c = 2 then
                                   begin
                                     lane32(stroke);
                                     c := c + 1;
                                   end;
                             end;
                           if key2 = '4' then
                             begin
                               if d = 0 then
                                 begin
                                   lane4(stroke) ;
                                   d := d + 1;
                                 end
                               else
                                 if d = 1 then
                                   begin
                                     lane41(stroke);
                                     d := d+1;
                                   end
                               else
                                 if d = 2 then
                                   begin
                                     lane42(stroke);
                                     d := d + 1;
                                   end;
                             end;
                           if key2 = '5' then
                             begin
                               if e = 0 then
                                 begin
                                   lane5(stroke);
                                   e := e + 1;
                                 end
                               else
                                 if e = 1 then
                                   begin
                                     lane51(stroke);
                                     e := e+1;
                                   end
                               else
                                 if e = 2 then
                                   begin
                                     lane52(stroke);
                                     e := e + 1;
                                   end;
                             end;
                           if key2 = '6' then
                             begin
                               if f = 0 then
                                 begin
                                   lane6(stroke);
                                   f := f + 1;
                                 end
                               else
                                 if f = 1 then
                                   begin
                                     lane61(stroke);
                                     f := f+1;
                                   end
                               else
                                 if f = 2 then
                                   begin
                                     lane62(stroke);
                                     f := f + 1;
                                   end;
                             end;
                           if key2 = '7' then
                             begin
                               if g = 0 then
                                 begin
                                   lane7(stroke);
                                   g := g + 1;
                                 end
                               else
                                 if g = 1 then
                                   begin
                                     lane71(stroke);
                                     g := g+1;
                                   end
                               else
                                 if g = 2 then
                                   begin
                                     lane72(stroke);
                                     g := g + 1;
                                   end;
                             end;
                           if key2 = '8' then
                             begin
                               if h = 0 then
                                 begin
                                   lane8(stroke);
                                   h := h + 1;
                                 end
                               else
                                 if h = 1 then
                                   begin
                                     lane81(stroke);
                                     h := h+1;
                                   end
                               else
                                 if h = 2 then
                                   begin
                                     lane82(stroke);
                                     h := h + 1;
                                   end;
                             end;
                           key2 := readkey;
                         until key2 = 'x'
                       end;
                  end;
                end;
              end;
         end;
       end;
    2:
       begin
         clrscr;
         writeln('Before starting the program you will need to set the screen size to 120.');
         writeln('You do this by running the program and then going to properties, in layout and change it from 80 to 120.');
         writeln('');
         writeln('');
         writeln('Using one lap all you will have to do is press the key number which the person is swimming in.');
         writeln('The order of lanes goes 4, 5, 3, 6, 2, 7, 1, 8 so if there were 5 swimmers you would uses lanes 4, 5, 3, 6 and 2.');
         writeln('');
         writeln('');
         writeln('So if you were using lanes 4, 5, 3, 6 and 2 and they were swimming 4 lengths, for the first length');
         writeln('time you would use 23456, for the next length''s time you would use the same numbers and for the last');
         writeln('length you would also use the same numbers.');
         writeln('');
         writeln('Once you have finished the program the letter (x) will let you close the program.');
         writeln('');
         writeln('');
         writeln('When it asked for a stroke please enter one of the following:');
         writeln('');
         writeln('bk - for Backcrawl');
         writeln('br - for Breaststroke');
         writeln('bf - for Butterfly');
         writeln('fc - for Frontcrawl');
         writeln('');
         writeln('Please press enter when finished');
         readln
       end;
  end;
end.

Remarks

Could you make this program start the stopwatch when a key is pressed? Could you write a timer program to flag up any records achieved in other sports such as running and cycling?

Programming - a skill for life!

by Daniel Lever: L6 Age ~16