var matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]; var vector = array(matrix.length); for (var i=0; i<matrix.length; i++) { vector[i] = 0; for (var j=0; j<matrix[i].length; j++) { vector[i] = vector[i] + matrix[i][j]; } } write("matrix contain these values:\n"); for (var i=0; i<matrix.length; i++) { for (var j=0; j<matrix[i].length; j++) { write(matrix[i][j] + " "); } write("\n"); } write("\nvector contain these values:\n"); for (var i=0; i<vector.length; i++) { write(vector[i] + " "); }
(
)
{
}
[
]
"
;
=
+
-
*
!
/
%
&
|