#include "syscall.h"Go to the source code of this file.
Defines | |
| #define | Dim 20 |
Functions | |
| int | main () |
Variables | |
| int | A [Dim][Dim] |
| int | B [Dim][Dim] |
| int | C [Dim][Dim] |
|
|
Definition at line 12 of file matmult.c. Referenced by main. |
|
|
Definition at line 21 of file matmult.c. References A, B, C, Dim, Exit, and j.
00022 {
00023 int i, j, k;
00024
00025 for (i = 0; i < Dim; i++) /* first initialize the matrices */
00026 for (j = 0; j < Dim; j++) {
00027 A[i][j] = i;
00028 B[i][j] = j;
00029 C[i][j] = 0;
00030 }
00031
00032 for (i = 0; i < Dim; i++) /* then multiply them together */
00033 for (j = 0; j < Dim; j++)
00034 for (k = 0; k < Dim; k++)
00035 C[i][j] += A[i][k] * B[k][j];
00036
00037 Exit(C[Dim-1][Dim-1]); /* and then we're done */
00038 }
|
|
|
Definition at line 16 of file matmult.c. Referenced by main. |
|
|
Definition at line 17 of file matmult.c. Referenced by main. |
|
|
Definition at line 18 of file matmult.c. Referenced by main. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002