Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
*process mar(1,72);
|
||||
remdup: Proc options(main);
|
||||
declare t(20) fixed initial (6, 6, 1, 5, 6, 2, 1, 7,
|
||||
5, 22, 4, 19, 1, 1, 6, 8, 9, 10, 11, 12);
|
||||
declare (i, j, k, n, e) fixed;
|
||||
|
||||
put skip list ('Input:');
|
||||
put edit ((t(k) do k = 1 to hbound(t))) (skip,20(f(3)));
|
||||
n = hbound(t,1);
|
||||
i = 0;
|
||||
outer:
|
||||
do k = 1 to n;
|
||||
e = t(k);
|
||||
do j = k-1 to 1 by -1;
|
||||
if e = t(j) then iterate outer;
|
||||
end;
|
||||
i = i + 1;
|
||||
t(i) = e;
|
||||
end;
|
||||
|
||||
put skip list ('Unique elements are:');
|
||||
put edit ((t(k) do k = 1 to i)) (skip,20(f(3)));
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue