1)
var x, y, f: integer;
function max(a, b, c: integer): integer;
var temp_max: integer;
begin
if a > b then temp_max := a
else temp_max := b;
if c > temp_max then temp_max := c;
max := temp_max;
end;
begin
write('Введите x, y: '); readln(x, y);
if(x > y) then f := max(x, y - 5, x*x + 1)
else f := max(x + 1, y + 1, 3);
writeln('f = ' , f);
end.