21.5₆ = 2×6+1+5/6 = 13 5/6 если в виде простой дроби
Если в виде десятичной, 13,8(3) ≈ 13,83333
Const n = 15;
var a: array[1..n] of integer;
i, j, m: integer;
begin
// генерация и вывод
randomize;
for i := 1 to n do a[i] := Random(19)-8;
for i := 1 to n do write(a[i], ' ');
writeln;
// Сортировка
for i := 1 to n-1 do begin
m := i;
for j := i+1 to n do
if a[j] < a[m] then m := j;
if m <> i then begin
j := a[m];
a[m] := a[i];
a[i] := j;
end;
end;
for i := 1 to n do write(a[i], ' ');
writeln;
// поиск наибольшей разности
m := a[2] - a[1];
for i := 3 to n do
if a[i] - a[i-1] > m then
m := a[i] - a[i-1];
writeln ('разность = ', m);
<span>end.</span>
Var
a:array [1..100] of integer;
n,l,i,j:integer;
begin
<span>for i:=1 to 20 do</span>
read (a[i]);
for j:=1 to N-1 do
for i:=1 to N-j do
<span>if a[i] > a[i+1] </span>
<span>then </span>
<span>begin </span>
l:=a[i];
a[i]:=a[i+1];
a[i+1]:=l;
end;
for i:=1 to 20 do
<span>if ((a[i] mod 2)=1) and ((a[i] mod 5)=0) </span>
<span>then </span>
begin
writeln (a[i]);
break;
else writeln('таких чисел нет');
end;
<span>end.</span>