tasks a-s

This commit is contained in:
Ingy döt Net 2013-04-10 23:57:08 -07:00
parent 47bf37c096
commit b83f433714
12433 changed files with 156208 additions and 123 deletions

View file

@ -0,0 +1,18 @@
declare t(20) fixed initial (1, 5, 6, 2, 1, 7,
5, 22, 4, 19, 1, 1, 6, 6, 6, 8, 9, 10, 11, 12);
declare (i, j, k, n, e) fixed;
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, f(11));