Предмет: Информатика,
автор: мороз12
найдите max из 3 чисел ,введенных с клавиатуры pascal
Ответы
Автор ответа:
0
var a,b,c,max:integer;
begin
readln(a);
readln(b);
readln(c);
if (a=b) and (a=c) then writeln('все числа одинаковые') else begin
if (a>=b) and (a>=c) then max:=a;
if (b>=a) and (b>=c) then max:=b;
if (c>=b) and (c>=a) then max:=c;
writeln(max);
end;
end.
begin
readln(a);
readln(b);
readln(c);
if (a=b) and (a=c) then writeln('все числа одинаковые') else begin
if (a>=b) and (a>=c) then max:=a;
if (b>=a) and (b>=c) then max:=b;
if (c>=b) and (c>=a) then max:=c;
writeln(max);
end;
end.
Похожие вопросы
Предмет: Русский язык,
автор: milanabezuglaa34
Предмет: Геометрия,
автор: Mitorii
Предмет: Геометрия,
автор: raxman20080
Предмет: Биология,
автор: Ikinder