Задача 9 Урок 9
Primary tabs
Пользователь вводит четыре числа, найдите из них максимальное -- решите через вложенные блоки if в полной форме (без использования логических операций).
var a, b, c, d: integer;
begin
readln(a,b,c,d);
if (a>b) then
if (b>c) then
if (c>d) then
writeln(a)
else
writeln(d)
else
if (c>d) then
writeln(c)
else
writeln(d)
else
if (b>c) then
if (c>d) then
writeln(b)
else
writeln(d)
else
if (c>d) then
writeln(c)
else
writeln(d);
readln();
end.- Log in to post comments
- 595 reads