I'm trying to make a java algorithm to display a string of letters arranged in a "Z" format. If the alphabet finishes, go back to A and continue until you finish the matrix. I'm really lost in relation to the matrix. Could someone help?
An example of what I need to do:
packageLearning;importjava.util.Scanner;publicclassZ{publicstaticvoidmain(String[]args){Scannerscan=newScanner(System.in);System.out.println("Enter The Number Of Matrix Rows ");
int matrixRow = scan.nextInt();
System.out.println("Enter The Number Of Matrix Columns: ");
int matrixCol = scan.nextInt();
if (matrixRow > 50 && matrixCol > 50) {
System.out.print("ERROR");
}
if (matrixRow != matrixCol) {
System.out.print("ERROR");
if (matrixRow <= 2 && matrixCol <= 2) {
System.out.print(" ERROR");
}
int[][] matrix = new int[matrixRow][matrixCol];
for (int i = 65; i < matrixRow; i++) {
for (int j = matrixRow; j < matrixCol; j++) {
}
for (int l = 0; l < matrixRow; l++) {
for (int c = 0; c < matrixCol; c++) {
System.out.print(array[matrixRow][matrixCol] + "\t");
}
System.out.println();
}
}
}
}