Задача 7 Урок 9
Primary tabs
Пользователь вводит четыре числа, найдите из них максимальное.
program maxOf4;
var a,b,c,d,x,y: integer;
begin;
writeln('what is nums a, b, c, d ?: ');
read(a,b,c,d);
if (a>b) then
x:=a
else if (a<b) then
x:=b;
if (c>d) then
y:=c
else if (c<d) then
y:=d;
if (x>y) then
writeln('max of a, b, c, d is ', x)
else
writeln('max of a, b, c, d is ', y);
readln(); readln();
end. - Log in to post comments
- 972 reads
vedro-compota
Thu, 04/22/2021 - 21:52
Permalink
решите через вложенные блоки
решите через вложенные блоки if
_____________
матфак вгу и остальная классика =)