# 12 to Transpose a Matrix

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

## Documents

Published:

Views: 14 | Pages: 1

Share
Related documents
Description
12 to Transpose a Matrix
Transcript
C program to transpose amatrix This c program prints transpose of a matrix. It is obtained by interchanging rows and columns of a matrix. For example if a matrix is1 23 45 then transpose of abo!e matrix will be1 3 52 4   hen we transpose a matrix then the order of matrix changes#  but for a s\$uare matrix order remains same. #include <stdio.h> int main(){ int m, n, c, d, matrix[10][10], transpose[10] [10];  printf(!nter the num er of ros and columns of matrix \n ); scanf(\$d\$d, %m, %n);  printf(!nter the elements of matrix \n ); for (c & 0; c < m; c'')  for(d & 0; d < n; d'')  scanf(\$d,%matrix[c][d]);  for (c & 0; c < m; c'')  for( d & 0 ; d < n ; d'' )  transpose[d][c] & matrix[c][d];  printf(ranspose of entered matrix * \n ); for (c & 0; c < n; c'') {  for (d & 0; d < m; d'')  printf(\$d \t ,transpose[c][d]);  printf( \n ); + return 0; +
Recommended

26 pages

4 pages

6 pages

6 pages

9 pages

39 pages

21 pages

24 pages

15 pages

44 pages

2 pages

22 pages

30 pages

18 pages

10 pages

View more...