回答編集履歴
2
コードの修正
test
CHANGED
@@ -148,7 +148,7 @@
|
|
148
148
|
|
149
149
|
Matrix x = new Matrix();
|
150
150
|
|
151
|
-
Matrix A = new Matrix(x.getRow(args[0]), x.getColumn(args[
|
151
|
+
Matrix A = new Matrix(x.getRow(args[0]), x.getColumn(args[0]));
|
152
152
|
|
153
153
|
A.read(args[0]); // A = A.read(args[0]); と書いても動くけど
|
154
154
|
|
1
コードの修正
test
CHANGED
@@ -74,9 +74,7 @@
|
|
74
74
|
|
75
75
|
matrix = new double[row][col];
|
76
76
|
|
77
|
-
br.readLine();
|
77
|
+
String line = br.readLine();
|
78
|
-
|
79
|
-
String line;
|
80
78
|
|
81
79
|
for (int M = 0; M < row && (line = br.readLine()) != null; M++) {
|
82
80
|
|
@@ -120,9 +118,9 @@
|
|
120
118
|
|
121
119
|
public void print() {
|
122
120
|
|
123
|
-
for(int i = 0; i<row; i++) {
|
121
|
+
for(int i = 0; i < row; i++) {
|
124
122
|
|
125
|
-
for(int j = 0; j<col; j++) {
|
123
|
+
for(int j = 0; j < col; j++) {
|
126
124
|
|
127
125
|
System.out.print(" " + matrix[i][j]);
|
128
126
|
|