回答編集履歴
1
AT -> B
test
CHANGED
@@ -88,7 +88,7 @@
|
|
88
88
|
|
89
89
|
// 和を求める
|
90
90
|
|
91
|
-
void mat_add(double A[3][3], double
|
91
|
+
void mat_add(double A[3][3], double B[3][3], double Sum[3][3])
|
92
92
|
|
93
93
|
{
|
94
94
|
|
@@ -96,7 +96,7 @@
|
|
96
96
|
|
97
97
|
for (int j = 0; j < 3; j++)
|
98
98
|
|
99
|
-
Sum[i][j] = A[i][j] +
|
99
|
+
Sum[i][j] = A[i][j] + B[i][j];
|
100
100
|
|
101
101
|
}
|
102
102
|
|
@@ -104,7 +104,7 @@
|
|
104
104
|
|
105
105
|
//差を求める
|
106
106
|
|
107
|
-
void mat_sub(double A[3][3], double
|
107
|
+
void mat_sub(double A[3][3], double B[3][3], double Dif[3][3])
|
108
108
|
|
109
109
|
{
|
110
110
|
|
@@ -112,7 +112,7 @@
|
|
112
112
|
|
113
113
|
for (int j = 0; j < 3; j++)
|
114
114
|
|
115
|
-
Dif[i][j] = A[i][j] -
|
115
|
+
Dif[i][j] = A[i][j] - B[i][j];
|
116
116
|
|
117
117
|
}
|
118
118
|
|