DAS_2024_1/emelyanov_artem_lab_6/MatrixGenerator.java

12 lines
331 B
Java
Raw Permalink Normal View History

2024-10-19 14:17:22 +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;
}
}