Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Forward-difference/PL-I/forward-difference.pli
Normal file
21
Task/Forward-difference/PL-I/forward-difference.pli
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* Forward differences. */ /* 23 April 2010 */
|
||||
differences: procedure options (main);
|
||||
declare a(10) fixed(10) static initial
|
||||
(7, 3, 9, 250, 300, 4, 68, 72, 154, 601);
|
||||
declare (i, j, m, n, t, u) fixed binary;
|
||||
|
||||
m = hbound(a,1);
|
||||
get (n); if n > m then signal error;
|
||||
put skip edit (a) (F(7));
|
||||
do i = 1 to n;
|
||||
t = a(i);
|
||||
do j = i+1 to m;
|
||||
u = a(j);
|
||||
a(j) = a(j) - t;
|
||||
t = u;
|
||||
end;
|
||||
put skip edit (a) (F(7));
|
||||
end;
|
||||
put skip edit ((a(i) do i = n+1 to m)) (F(9));
|
||||
|
||||
end differences;
|
||||
Loading…
Add table
Add a link
Reference in a new issue