DAS_2024_1/emelyanov_artem_lab_6/MatrixGenerator.java

12 lines
331 B
Java

public class MatrixGenerator {
public static int[][] generateMatrix(int size) {
int[][] matrix = new int[size][size];
for (int i = 0; i < size; i++) {
for (int j = 0; j < size; j++) {
matrix[i][j] = (int) (Math.random() * 100);
}
}
return matrix;
}
}