DAS_2024_1/emelyanov_artem_lab_5/MatrixGenerator.java

12 lines
331 B
Java
Raw Permalink Normal View History

2024-10-18 17:41:49 +04:00
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;
}
}