
4
By: a guest on
Jun 22nd, 2012 | syntax:
Pascal | size: 0.86 KB | hits: 14 | expires: Never
program poft_4;
const
nmax=10;
var
a,b:array[1..nmax] of integer;
n,j,c,i:integer;
flag:boolean;
BEGIN
Repeat
Writeln('������ ������⢮ �����⮢ ���ᨢ�');
Readln(n);
if (n<1) or (n>10) then
Writeln('�訡��');
Until (n<=10) and (n>=1);
Writeln('������ ������� ���ᨢ�');
for i:=1 to n do
Read(a[i]);
Writeln;
c:=0;
for i:=1 to n do
begin
flag:=false;
j:=i+1;
while flag=false and (j<=n) do
if a[i]=a[j] then
flag:=true
else j:=j+1;
if flag=false then
begin
c:=c+1;
b[c]:=a[i];
end;
end;
writeln('�� �����⮢ ��ନ������ ���ᨢ� =',j:2);
for i:=1 to j do
write(b[i]:3);
End.