answersLogoWhite

0

/* multiplication of a 3*3 matrix*/

#include<stdio.h>

main()

{

int a[3][3],b[3][3],c[3][3];

int i,j,k;

printf("enter the elements in A matrix:\n");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

{

scanf("%d",&a[i][j]);

}

}

printf("enter b matrix:\n");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

{

scanf("%d",&b[i][j]);

}

}

for(i=0;i<=2;i++)

{

printf("\n");

for(j=0;j<=2;j++)

{

c[i][j]=0;

for(k=0;k<=2;k++)

{

c[i][j] = c[i][j]+a[i][k] * b[k][j];

}

}

}

printf("multiplication matrix is:\n");

for(i=0;i<=2;i++)

{

for(j=0;j<=2;j++)

{

printf("%d\t",c[i][j]);

}

printf("\n");

}

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you Write A program in c language for checking a diagonal matrix?

Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.


A c program to square matrix?

A C program to square matrix is a math problem. In the math problem you write down all the outer boundary values of matrix in a circle, then write down the inner value.


Write a c program to find eigenvalue of a matrix?

Yes, do write. That's what you always have to do when you have got a homework-program.


Write a c program for matrix addition using function?

#include&lt;


Write a C program to find sum of 3 matrices?

matrix


Write a c program to determine whether a matrix is singular or not?

A c program is also known as a computer program. A singular matrix has no inverse. An equation to determine this would be a/c=f. &lt;&lt;&gt;&gt; The determinant of a singular matix is zero.


How do you write c program to perform sum of elements of matrix using pointers with functions?

i cant write


Write a program to multiply 33 matrix.?

write a program to multily 3*3 matrix.


Write a c program on reverse the diagonal element of matrix?

mano ni anda yarrr


Write a C program using dynamic memory allocation to find the sum of elements of a matrix?

Did you know that memory allocation is not needed to display the matrix? However, the C program is to find the sum of all the elements.


How do you write a C program to find the adjoint of a matrix?

To write a C program to find the adjoint of a matrix, first, you need to create a function to calculate the cofactor of each element in the matrix. Then, construct the adjoint by transposing the cofactor matrix. The program should read the matrix size and elements from user input, compute the cofactors using nested loops, and finally display the adjoint matrix by transposing the cofactor matrix. Make sure to handle memory allocation for dynamic matrices if needed.


2x2 matrix multiplication program in 8085 processor?

how to write a program for matrix multiplication in microprocesspr