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
18 comments:
It is my luck..i am searched alot for this program in a single loop..thanks.
thank u................
can u give d code using pointers???
i am very happy to get my all pl matrix prog
thank you
Thanks a lot for your programs it helped me a lot.Could you post the progra to find the anti diagonal elements in a matrix.Thanks in advance.
if t want add the sum of both diagonals,then how can i do?
#include
#include
void main()
{
int a[10][10],b[10][10],c[10][10],n,i,j;
printf("Enter the value of n=>");
scanf("%d",&n);
printf("Enter the First matrix->");
for(i=0;i");
for(i=0;i<n;i++)
for(j=0;j<n;j++)
scanf("%d",&b[i][j]);
printf("\nThe First matrix is\n");
for(i=0;i<n;i++){
printf("\n");
for(j=0;j<n;j++)
printf("%d\t",a[i][j]);
}
printf("\nThe Second matrix is\n");
for(i=0;i<n;i++){
printf("\n");
for(j=0;j<n;j++)
printf("%d\t",b[i][j]);
}
for(i=0;i<n;i++)
for(j=0;j<n;j++)
c[i][j]=a[i][j]+b[i][j];
printf("\nThe Addition of two matrix is\n");
for(i=0;i<n;i++){
printf("\n");
for(j=0;j<n;j++)
printf("%d\t",c[i][j]);
}
getch();
}
nice....
sweet thanks a lot.....................................thousand times thank you..............................................................................................................................................
int dia_add(int a[][])
{
int k=m=>n?n:m;
for(i=0;i<k;i++)
{
sum=sum+a[i][i];
}
}
if the user wants to enter a number and replace the diagonal by this number what is the code
Thanks...
your effort.. must be appreciated.
Thanks...
Please provide me a program to print sum of the diagonal elements from both the sides.....
#include
void main()
{
int a[10][10],i,j,k,m,n,sum,opp_sum;
printf("\nEnter the size of the matrix:\n");
scanf("%d %d",&m,&n);
if(m==n)
{
printf("\nEnter the elements of the matrix:\n");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&a[i][j]);
}
}
}
else
{
printf("\nNot a square matrix");
exit(0);
}
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
printf(" %d",a[i][j]);
}
printf("\n");
}
sum=0;
opp_sum=0;
for(i=0;i<m;++i)
{
sum=sum+a[i][i];
opp_sum=opp_sum+a[i][m-i-1];
}
printf("\nThe Sum of the principle diagonal elements=%d\n",sum);
printf("\nThe sum of the opposite diagonal elements=%d\n",opp_sum);
}
thnx a lot :)
lot of thanxxxx,,,,
try the program run
Create a 12 x 12 matrix for representing a multiplication table, where the i, jth element of the matrix stores the value i * j.
Thanks
Post a Comment