Задача 7 Урок 9
Primary tabs
Пользователь вводит четыре числа, найдите из них максимальное.
var a, b, c, d, n, m: integer;
begin
writeln('Vvedite pervoe chislo (int) A =');
readln(a);
writeln('Vvedite vtoroe chislo (int) B =');
readln(b);
writeln('Vvedite tretye chislo (int) C =');
readln(c);
writeln('Vvedite chetvertoe chislo (int) D =');
readln(d);
if (a > b) then
begin
n := a;
end
else if (a < b) then
begin
n := b;
end;
if (c > d) then
begin
m := c;
end
else if (c < d) then
begin
m := d;
end;
if (n > m) then
begin
writeln(n, ' - maximalnoe chislo');
end
else
begin
writeln(m, ' - maximalnoe chislo');
end;
readln();
end.КОНСОЛЬ
Vvedite pervoe chislo (int) A = 1 Vvedite vtoroe chislo (int) B = 2 Vvedite tretye chislo (int) C = 3 Vvedite chetvertoe chislo (int) D = 4 4 - maximalnoe chislo
- Log in to post comments
- 1478 reads
vedro-compota
Sun, 10/03/2021 - 12:10
Permalink
решение засчитано
решение засчитано
_____________
матфак вгу и остальная классика =)