/* Write a C program to accept a matrix of given order and * interchnge any two rows and columns in the original matrix*/ #include <stdio.h> void main() { static int m1[10][10],m2[10][10]; int i,j,m,n,a,b,c, p, q, r; printf ("Enter the order of the matrix\n"); scanf ("%d %d",&m,&n); printf ("Enter the co-efficents of the matrix\n"); for (i=0; i<m;++i) { for (j=0;j
/* first row has index is 0 */
printf ("Enter the numbers of two columns to be exchnged\n"); scanf ("%d %d",&p,&q); printf ("The given matrix is \n"); for (i=0;i<m;++i) { for (j=0;j
/* first column index is 0 */
printf ("The matix after interchnging the two rows(in the original matrix)\n"); for (i=0; i<m; ++i) { for (j=0; j
} }
printf ("\n");
printf("The matix after interchnging the two columns(in the original matrix)\n"); for (i=0;i<m;++i) { for (j=0;j
More Documents from "Surya Tej"