write a program in c to generate the following matrics: A = [ 3 5 7 2 −3 4 4 5 2 ] , B = [ 7 6 6 −5 4 3 ]

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;

}

More From Author

Write a program that uses a “for” loop to compute and prints the sum of a given<br>numbers of squares.

Write a function to add, subtract, multiply, and divide two complex numbers (x +iy) and (c + id). in C