Refactored Lab2
This commit is contained in:
parent
0b16cf927b
commit
71baf63a21
|
@ -66,7 +66,7 @@ public class Lab2 {
|
||||||
private static void scanMatrix(byte[][] matrix, Scanner scan) { //Method for filling matrix
|
private static void scanMatrix(byte[][] matrix, Scanner scan) { //Method for filling matrix
|
||||||
for (byte i = 0; i < matrix.length; i++) {
|
for (byte i = 0; i < matrix.length; i++) {
|
||||||
for (byte j = 0; j < matrix[i].length; j++) {
|
for (byte j = 0; j < matrix[i].length; j++) {
|
||||||
System.out.print("Enter element" + "[" + i + "]" + "[" + j + "]: ");
|
System.out.printf("Enter element [%d][%d]", i, i);
|
||||||
matrix[i][j] = scan.nextByte();
|
matrix[i][j] = scan.nextByte();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue