const n = 10; Type arrType = Array[1 .. n] Of Integer; Procedure Bubble(Var ar: arrType; n: integer); Var i, j, T: Integer; Begin For i := 1 To n Do For j := n DownTo i+1 Do If ar[Pred(j)] > ar[j] Then Begin T := ar[Pred(j)]; ar[Pred(j)] := ar[j]; ar[j] := T End End; const a: arrType = (1, 2, 3, 2, 3, 5, 4, 5, 2, 5); var i, T, count: integer; b: array[1 .. n] of integer; begin (* For i := 1 To n Do Begin Write('A[', i:2, '] = '); ReadLn(a[i]); End; *) Bubble(a, n); i := 1; while i <= n do begin T := 0; repeat inc(i); inc(T); until (a[i-1] <> a[i]) or (i > n); if T > 1 then begin inc(count); b[count] := a[i-1]; end; end; For i := 1 To count Do Write(b[i]:4); WriteLn; end.