google.com, pub-6167773875660516, DIRECT, f08c47fec0942fa0 Write a c program to find transpose of a matrix - 2nd puc computer science

Write a c program to find transpose of a matrix

Write a c program to find the transpose of a given matrix,Write a c program to find the transpose of a square matrix,Write a c program to find the transpose of a matrix of order 3x3,Write a c program to find the transpose of a 2d array,Write a c program to find the transpose of a 3x3 matrix,Write a c program to find transpose of a matrix,Write a program to find transpose of a matrix in c

Write a c program to find transpose of a matrix

#include<stdio.h>

#include<conio.h>

void main()

{

int a[10][10],i,j,r,c;

clrscr();

printf("Enter the order of matrix:\n");

scanf("%d%d",&r,&c);

printf("Enter the elements\n");

for(i=0;i<r;i++)

for(j=0;j<c;j++)

scanf("%d",&a[i][j]);

printf("Entered matrix is\n");

for(i=0;i<r;i++)

{

         for(j=0;j<c;j++)

         printf("%d",a[i][j]);

         printf("\n");

}

printf("Transpose of a matrix\n");

for(i=0;i<c;i++)

{

         for(j=0;j<r;j++)

         printf("%d",a[j][i]);

         printf("\n");

}

getch();

}

Output:

Enter the order of matrix:

2                                                                              

3                                                                              

Enter the elements                                                             

1                                                                               

2                                                                              

3                                                                              

4                                                                               

5                                                                              

6                                                                              

Entered matrix is                                                               

123                                                                            

456                                                                            

Transpose of a matrix                                                           

14                                                                             

25                                                                             

36                                                                              


Write a c program to find transpose of a matrix Write a c program to find transpose of a matrix Reviewed by Vision Academy on December 12, 2021 Rating: 5

No comments:

CheckOut

Powered by Blogger.