13 lines
191 B
Text
13 lines
191 B
Text
include c:\cxpl\codes;
|
|
|
|
func DotProd(U, V, L);
|
|
int U, V, L;
|
|
int S, I;
|
|
[S:= 0;
|
|
for I:= 0 to L-1 do S:= S + U(I)*V(I);
|
|
return S;
|
|
];
|
|
|
|
[IntOut(0, DotProd([1, 3, -5], [4, -2, -1], 3));
|
|
CrLf(0);
|
|
]
|