my code is working on other ide but not here.
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int m=sc.nextInt();
int n=sc.nextInt();
int[][] arr=new int[m][n];
int i,j;
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
arr[i][j]=sc.nextInt();
}
}
for(j=n-1;j>=0;j--)
{
for(i=0;i<m;i++)
{
System.out.print(arr[i][j]+" ");
}
System.out.println();
}
}
}