programme stop after calling the method in the main

Hi
I've made a method in a class ,the method purpose is to eliminate duplicated number in a row of 2D array,after creating one.
this method it's located in a class the problem when I call it in the main after creating a numbers[5][6], I want to eliminate similar numbers in a row.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 	void removeSimlairNum() {

		for (int row = 0; row < 5; row++) {
			for (int col = 0; col < 6; col++) {
				for (int j = col + 1; col < 6; j++) {
					if (numbers[0][col] == numbers[0][j]) {
						numbers[0][col] = generateRandom(0, 19);
					}
					if (numbers[1][col] == numbers[1][j]) {
						numbers[1][col] = generateRandom(20, 39);
					}
					if (numbers[2][col] == numbers[2][j]) {
						numbers[2][col] = generateRandom(40, 59);
					}
					if (numbers[3][col] == numbers[3][j]) {
						numbers[3][col] = generateRandom(60, 79);
					}
					if (numbers[4][col] == numbers[4][j]) {
						numbers[4][col] = generateRandom(80, 99);
					}
				}

			}

		}
	}
Last edited on
Topic archived. No new replies allowed.