all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,16 @@
INSSORT: PROCEDURE (A);
DCL A(*) FIXED BIN(31);
DCL (I, J, V, N) FIXED BIN(31);
N = HBOUND(A,1); M = LBOUND(A,1);
DO I=M+1 TO N;
V=A(I);
J=I-1;
DO WHILE (J > M-1);
if A(J) <= V then leave;
A(J+1)=A(J); J=J-1;
END;
A(J+1)=V;
END;
RETURN;
END INSSORT;