program xoa_pt_trung_nhau;
uses crt;
var a:array[1..100] of real;
b:array[1..100] of boolean;
n,i,j:byte;
begin
clrscr;
write('nhap so luong phan tu cua mang: ');
readln(n);
for i:= 1 to n do
begin
write('nhap phan tu thu [',i,']= ');
readln(a[i]);
end;
for i:= 1 to n do
b[i]:=true;
for i:= 1 to n-1 do
for j:= i+1 to n do
if a[i]= a[j] then b[j]:=false;
for i:= 1 to n do
if b[i] =true then
write(a[i]:6:2);
readln
end.
uses crt;
var a,b:array[1..100]of integer;
i,n,j,dem,kt:integer;
begin
clrscr;
write('nhap so phan tu:'); readln(n);
for i:=1 to n do
begin
a[i]:=random(100);
end;
{-------------------------------------------------}
for i:=1 to n do write(a[i]:4);
{---------------------------------------------------}
writeln;
writeln('day so ko trung cua day A=');
b[1]:=a[1];
dem:=1;
for i:=1 to n do
begin
kt:=0;
for j:=1 to dem do
if a[i]=b[j] then kt:=1;
if kt=0 then begin
dem:=dem+1;
b[dem]:=a[i];
end;
end;
for i:=1 to dem do write(b[i]:4);
readln;
end.