Jan
24
#include<stdio.h>
#include<conio.h>
#define MAX 3
void main(){
int i,j;
int arr1[MAX][MAX],arr2[MAX][MAX];
printf(“Enter%d elements of matrix A row-wise\n”,MAX*MAX);
for(i=0;i<3;i++){
for(j=0;j<3;j++){
scanf(“%d”,&arr1[i][j]);
}
}
for(i=0;i<3;i++){
for(j=0;j<3;j++){
arr2[j][i]=arr1[i][j];
}
}
for(i=0;i<3;i++){
for(j=0;j<3;j++){
printf(“%d “,arr2[i][j]);
//arr2[j][i]=arr1[i][j];
}
printf(“\n”);
}
getch();
}
Leave a Reply
No Comments