Last Updated on by ICT BYTE
void displayMatrix(int matrix[][3], int rows, int columns) {
for (int i = 0; i < rows; i++) {
for (int j = 0; j < columns; j++) {
printf(“%d “, matrix[i][j]);
}
printf(“\n”);
}
}
int main() {
int A[3][3] = {
{3, 5, 7},
{2, -3, 4},
{4, 5, 2}
};
int B[3][2] = {
{7, 6},
{6, -5},
{4, 3}
};
printf("Matrix A:\n");
displayMatrix(A, 3, 3);
printf("\nMatrix B:\n");
displayMatrix(B, 3, 2);
return 0;
}