Read/Print Matrix
/* Store/read data in matrix by row */
void store(int m[][MAXSIZE], int n)
{
int i, j;
for(i = 0; i < n; ++i)
for(j = 0; j < n; ++j)
scanf("%d", &m[i][j]);
}
/* Print the matrix */
void print(int m[][MAXSIZE], int n)
{
int i, j;
for(i = 0; i < n; ++i) {
for(j = 0; j < n; ++j)
printf("%d ", m[i][j]);
putchar('\n');
}
}
This is program
pg273.c
.
Previous slide
Next slide
Back to first slide
View graphic version