/* Write A C Program To Accept A Amtric Of

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View /* Write A C Program To Accept A Amtric Of as PDF for free.

More details

  • Words: 253
  • Pages: 2
/* Write a C program to accept a amtric of order MxN and sort all rows * * of the matrix in ascending order and all columns in descendng order */ #include <stdio.h> void main () { static int ma[10][10],mb[10][10]; int i,j,k,a,m,n; printf ("Enter the order of the matrix \n"); scanf ("%d %d", &m,&n); printf ("Enter co-efficients of the matrix \n"); for (i=0;i<m;++i) { for (j=0;j ma[i][k]) { a = ma[i][j]; ma[i][j] = ma[i][k]; ma[i][k] = a; } } } } /* End of outer for loop*/ for (i=0;i<m;++i) { for (j=0;j
printf ("After arranging the columns in descending order \n"); for (j=0;j
/*End of main() */

/*------------------------------------------------Enter the order of the matrix 2 2 Enter co-efficients of the matrix 3 1 5 2 The given matrix is 3 1 5 2 After arranging rows in ascending order 1 3 2 5 After arranging the columns in descending order 5 2 3 1 -----------------------------------------------------*/

Related Documents