Задача 13 Урок 9
Primary tabs
Задача 13 Урок 9
У вас есть три числа (три переменные) найдите их медиану.
var a,b,c: integer;
begin
writeln('vvedite chisla a, b, c');
readln(a,b,c);
if a>b then
if b>c then
writeln(b)
else if c>a then
writeln (c)
else
writeln(a)
else if b<c then
writeln(b)
else if c<a then
writeln(c)
else
writeln(a);
readln();
end. - Log in to post comments
- 2464 reads
vedro-compota
Sun, 11/28/2021 - 12:59
Permalink
проверить форматирование
проверить форматирование
_____________
матфак вгу и остальная классика =)
Кас
Sun, 11/28/2021 - 13:37
Permalink
var a,b,c: integer;
var a,b,c: integer; begin writeln('vvedite chisla a, b, c'); readln(a,b,c); if a>b then if b>c then writeln(b) else if c>a then writeln (c) else writeln(a) else if b<c then writeln(b) else if c<a then writeln(c) else writeln(a); readln(); end.vedro-compota
Wed, 12/01/2021 - 18:32
Permalink
проверить для варианта: 2 1 3
проверить для варианта:
_____________
матфак вгу и остальная классика =)
Кас
Wed, 12/01/2021 - 20:33
Permalink
переписал код
var a,b,c: integer; begin writeln('vvedite chisla a, b, c'); readln(a,b,c); if (a>b)and(a<c) or (a<b)and(a>c) then writeln(a) else if (b>a)and(b<c) or (b<a)and(b>c) then writeln(b) else if (c>a)and(c<b) or (c<a)and(c>b) then writeln(c); readln(); end.