12 lines
132 B
Mathematica
12 lines
132 B
Mathematica
|
|
li_std_vector
|
||
|
|
|
||
|
|
iv = IntVector(4);
|
||
|
|
for i=0:3,
|
||
|
|
iv(i) = i;
|
||
|
|
endfor
|
||
|
|
x = average(iv);
|
||
|
|
|
||
|
|
if (x != 1.5)
|
||
|
|
error("average failed");
|
||
|
|
endif
|