Blame lazarus/console/box-and-hole/boxandhole.lpr

ab6427
program boxandhole;
ab6427
ab6427
var
ab6427
  a, b, c: integer;
ab6427
  x, y: integer;
ab6427
  pass: boolean;
ab6427
  s: string;
ab6427
ab6427
begin
ab6427
  Writeln('Enter box size (a, b, c):');
ab6427
  Readln(a);
ab6427
  Readln(b);
ab6427
  Readln(c);
ab6427
ab6427
  Writeln('Enter hole size (x, y):');
ab6427
  Readln(x);
ab6427
  Readln(y);
ab6427
ab6427
  pass := false;
ab6427
  if (a < x) and (b < y) then pass := true;
ab6427
  if (b < x) and (c < y) then pass := true;
ab6427
  if (c < x) and (a < y) then pass := true;
ab6427
ab6427
  if (b < x) and (a < y) then pass := true;
ab6427
  if (c < x) and (b < y) then pass := true;
ab6427
  if (a < x) and (c < y) then pass := true;
ab6427
ab6427
  { or coding conditions in other way:
ab6427
  pass := ((a < x) and (b < y))
ab6427
       or ((b < x) and (c < y))
ab6427
       or ((c < x) and (a < y))
ab6427
       or ((b < x) and (a < y))
ab6427
       or ((c < x) and (b < y))
ab6427
       or ((a < x) and (c < y));
ab6427
  }
ab6427
ab6427
  if pass then begin
ab6427
    writeln('Will pass trought');
ab6427
  end else begin
ab6427
    writeln('Box too large');
ab6427
  end;
ab6427
ab6427
  readln(s);
ab6427
end.