Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,29 @@
program dotproduct(output);
(* Dot product *)
const
maxi = 2;
type
realarray = array [0 .. maxi] of real;
var
x, y: realarray;
function dotproduct(a, b: realarray): real;
var
i: integer;
res: real;
begin
res := 0;
for i := 0 to maxi do
res := res + (a[i] * b[i]);
dotproduct := res;
end;
begin
x[0] := 1; x[1] := 3; x[2] := -5;
y[0] := 4; y[1] := -2; y[2] := -1;
writeln(dotproduct(x, y));
(* readln; *)
end.