Write a C program to transpose of a matrix.
#include<stdio.h> #include<conio.h> main() { int a[10][10],b[10][10],m,n,i,j; printf("\n enter the dimension of the matrix"); scanf("%d %d",&m,&n); printf("\n enter the elements(row wise)"); for(i=0;i<m;i++) { for(j=0;j<n;j++) scanf("%d",&a[i][j]); } for(i=0;i<n;i++) { for(j=0;j<m;j++) b[i][j]=a[j][i]; } printf("\n the transpose matrix is \n"); for(i=0;i<n;i++) { for(j=0;j<m;j++) printf("%d\t",b[i][j]); printf("\n"); } getch(); }
Output:
What do you mean by software crisis & its solution.
Discuss about SCHEDULING
Write a C program to convert decimal no. to binary.
Write a C program to check a year is leap year or not.