RosettaCodeData/Task/Dot-product/Craft-Basic/dot-product.basic

13 lines
112 B
Plaintext

dim a[1, 3, -5]
dim b[4, -2, -1]
arraysize n, a
for i = 0 to n - 1
let s = s + a[i] * b[i]
next i
print s