1.5 演習課題

  4.演習課題1-4 内積
<課題>
 2つの正方行列A,Bを入力として、その内積Cを求めるプログラムを作成しなさい。

<仕様> <プログラムリスト>

int main( void )
{
 int A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE];
 int size;

 scanf("%d\n", &size);     /* 行列サイズの指定 */
 read_mat(A, size);        /* 行列Aの読み込み */
 read_mat(B, size);        /* 行列Bの読み込み */
  mat_pro(A, B, C, size);   /* 内積の計算 */
  write_mat(C, size);       /* 結果の表示 */
}