5. Write a c program to find out transport of a matrix.
6. Write a c program for scalar multiplication of matrix.
7. C program to find inverse of a matrix
8. Lower triangular matrix in c
9. Upper triangular matrix in c
10. Strassen's matrix multiplication program in c
11. C program to find determinant of a matrix
12. Big list of c program examples
6. Write a c program for scalar multiplication of matrix.
7. C program to find inverse of a matrix
8. Lower triangular matrix in c
9. Upper triangular matrix in c
10. Strassen's matrix multiplication program in c
11. C program to find determinant of a matrix
12. Big list of c program examples
8 comments:
i guess the for loop bfore b[i][j]=0 nd bfore transposing shud hav i<n nd j<m am i rite?
i think initially for b[i][j] it should be scanf not printf because computer should store the matrix b first
Good Code !
hello
i want c program to transpose of a matrix by using functions
#include
void main()
{
int a[10][10],i,j,m,n;
printf("enter m(row) value");
scanf("%d",&m);
printf("enter n(column) value ");
scanf("%d",&n);
printf("enter matrix walues");
for(i=0;i<m;i++){
for(j=0;j<n;j++){
printf("enter a[%d][%d]",i,j);
scanf("%d",&a[i][j]);
}}
printf("after transpose");
for(i=0;i<m;i++){
for(j=0;j<n;j++){
printf("a[%d][%d]:%d",j,i,a[j][i]);
}
}
}
I want a c program to find out transpose of two user given matrices
#include
#include
int main(void)
{
int i , j;
int r, c ;
//Asking for no or rows and columns required
printf("Enter the Number of rows of matrix 1: ");
scanf("%d",&r);
printf("Enter the Number of columnss of matrix 1: ");
scanf("%d",&c);
int array[r][c];
int transpose[c][r];
//Inputs matrix's elemenst
printf("Enter elements of the matrix: \n");
for (i = 0; i<r; i++)
{
for (j = 0; j<c; j++)
{
scanf("%d",&array[i][j]);
}
}
//Transpose of the matrix
for (i = 0 ; i<r; i++)
{
for (j = 0 ; j<c; j++)
{
transpose[j][i] = array[i][j];
}
}
//Printing the transposed matrix
printf("\n");
for (i = 0; i<c; i++)
{
for (j = 0; j<r; j++)
{
printf("%d ",transpose[i][j]);
}
printf("\n");
}
return 0;
}
Post a Comment