Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
17
Task/Forward-difference/PascalABC.NET/forward-difference.pas
Normal file
17
Task/Forward-difference/PascalABC.NET/forward-difference.pas
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
function Convert(a: array of integer): array of integer;
|
||||
begin
|
||||
var n := a.Length;
|
||||
var res := new integer[n-1];
|
||||
for var i:=0 to n-2 do
|
||||
res[i] := a[i+1]-a[i];
|
||||
Result := res;
|
||||
end;
|
||||
|
||||
begin
|
||||
var a := |90, 47, 58, 29, 22, 32, 55, 5, 55, 73|;
|
||||
while a.Length > 0 do
|
||||
begin
|
||||
Println(a);
|
||||
a := Convert(a);
|
||||
end;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue