Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
program RemoveDuplicateElements;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
uses Generics.Collections;
|
||||
|
||||
var
|
||||
i: Integer;
|
||||
lIntegerList: TList<Integer>;
|
||||
const
|
||||
INT_ARRAY: array[1..7] of Integer = (1, 2, 2, 3, 4, 5, 5);
|
||||
begin
|
||||
lIntegerList := TList<Integer>.Create;
|
||||
try
|
||||
for i in INT_ARRAY do
|
||||
if not lIntegerList.Contains(i) then
|
||||
lIntegerList.Add(i);
|
||||
|
||||
for i in lIntegerList do
|
||||
Writeln(i);
|
||||
finally
|
||||
lIntegerList.Free;
|
||||
end;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue