Задача 7 Урок 9

Задача 7 Урок 9

Пользователь вводит четыре числа, найдите из них максимальное.

var
    a,b,c,d : real;

begin
  write('vvedite 4 4isla ');
  readln(a,b,c,d);

  if (a > b) then
    if (a > c) then
      if (a > d) then
        write('max - ', a:0:1)
      else
        write('max - ', d:0:1)
    else
      if (c > d) then
        write('max - ', c:0:1)
      else
        write('max - ', d:0:1)
  else
    if (b > c) then
      if (b > d) then
        write('max - ', b:0:1)
      else
        write('max - ', d:0:1)
    else
      if (c > d) then
        write('max - ', c:0:1)
      else
        write('max - ', d:0:1);

  readln();
end.