0

Why transpose of matrix is not happen?? In the code

public class Program { public static void main(String[] args) { int a[][]={{1,2,3},{4,5,6},{7,8,9}}; for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ a[i][j]=a[j][i]; System.out.print(a[i][j]); } System.out.println(); } } }

26th Sep 2017, 8:58 AM
Vaibhav Solanki
2 Answers
+ 5
Link to your full code instead pls
26th Sep 2017, 9:13 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
0
Please don't link an incomplete code.
26th Sep 2017, 1:46 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar