See More

package Array; import java.util.Scanner; public class TransposeMatrix { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int rows = sc.nextInt(); int cols = sc.nextInt(); int matrix[][] = new int[rows][cols]; //input for(int i=0; i