GUVI
Back

Matrix question-1

Created 2 years ago
75 Views
2 Comments
MNanthaKumar
@MNanthaKumar
MNanthaKumar
@MNanthaKumarProfile is locked. Login

I have write the c program code and output also correct. after my submision. answer not accepted. Please find the mistake in my program

#include<stdio.h>

int main()

{

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

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

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

{

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

{

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

}

}

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

{

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

{

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

}

printf("\n");

}

return 0;

}

Comments (2)
Please login to comment.
 
Powered by habitate.io Habitate