var rows; var cols; var matrix; do { write("Enter the number of rows: "); rows = read(); } while (rows<=0 || isNaN(rows)); do { write("Enter the number of columns: "); cols = read(); } while (cols<=0 || isNaN(cols)); matrix = array(rows, cols); write("\n"); for (var i=0; i<matrix.length; i++) { for (var j=0; j<matrix[i].length; j++) { write("Enter matrix[" + i + "][" + j + "]: "); matrix[i][j] = read(); } write("\n"); } write("matrix contain:\n"); for (var i=0; i<matrix.length; i++) { for (var j=0; j<matrix[i].length; j++) { write(matrix[i][j] + " "); } write("\n"); }
(
)
{
}
[
]
"
;
=
+
-
*
!
/
%
&
|