const
COUNT = 100;
var
i,j,sum, tmp: integer;
a:array[1..COUNT] of integer;
begin
randomize;
for i:=1 to COUNT do
a[i]:= random(1, 100);
if (a[i] mod 3 = 0) then inc(sum);
end;
writeln('Кол-во кратных 3 = ', sum);
writeln('Отсортированый');
for j:=1 to COUNT-1 do
if (a[j]>a[j+1]) then
tmp:=a[j];
a[j]:=a[j+1];
a[j+1]:=tmp;
write(a[i],' ');
end.
const
COUNT = 100;
var
i,j,sum, tmp: integer;
a:array[1..COUNT] of integer;
begin
randomize;
for i:=1 to COUNT do
begin
a[i]:= random(1, 100);
if (a[i] mod 3 = 0) then inc(sum);
end;
writeln('Кол-во кратных 3 = ', sum);
writeln('Отсортированый');
for i:=1 to COUNT do
for j:=1 to COUNT-1 do
if (a[j]>a[j+1]) then
begin
tmp:=a[j];
a[j]:=a[j+1];
a[j+1]:=tmp;
end;
for i:=1 to COUNT do
write(a[i],' ');
end.