Goodnight. Guys, please hurt not to kick and help again :)
There is such a task
To test the residual knowledge of students after the summer holidays, the primary school teacher decided to start each lesson by setting an example from the multiplication table for each student, but there are 15 people in the class, and the examples among them should not be repeated. To help the teacher, write a program that will display 15 random examples from the multiplication table (from 2x2 to 9x9, because the multiplication tasks by 1 and by 10 are too simple). Moreover, among the 15 examples there should not be recurring (examples 2x3 and 3x2 and similar pairs should be considered repetitive).
Just output as 15 different examples no problems. Through the creation of an array of 15 rows and 3 columns.
public class Main { public static void main(String[] args) { int[][] massiv = new int[15][3]; for (int x = 0; x < massiv.length; x++) { massiv[x][0] = (int) (Math.random() * 9 + 1); massiv[x][1] = (int) (Math.random() * 9 + 1); massiv[x][2] = (massiv[x][0]) * (massiv[x][1]); } for (int x = 0; x < massiv.length; x++) { System.out.println("Пример №" + (x + 1) + ":\t\t" + massiv[x][0] + " * " + massiv[x][1] + " = " + massiv[x][2]); }} } and I don’t have any thoughts on how to make a check, tell me, at least in what direction to dig?