Hi, I have a VERY complex problem.
I need a 2D array with x*x elements. There are two cases:
1) 4 <= x < 8
2) 8 <= x <= 10
Case 1)
Every COLUMN of the array must be randomly filled with the letters a, b, c and d. Each column can only have each letter one time. If x is bigger than 4, then the vacancies of each column must be filled with k's (as many as necessary).
Also it's not allowed to have 2 k's one after the other in a ROW.
Case 2)
Every COLUMN of the array must be randomly filled with the letters a, b, c, d, e, f, g and h. Each column can only have each letter one time. If x is bigger than 8, then the vacancies of each column must be filled with k's (as many as necessary).
Also it's not allowed to have 2 k's one after the other in a ROW.
Does anybody know how I can make this very complex array?
Cindy
I need a 2D array with x*x elements. There are two cases:
1) 4 <= x < 8
2) 8 <= x <= 10
Case 1)
Every COLUMN of the array must be randomly filled with the letters a, b, c and d. Each column can only have each letter one time. If x is bigger than 4, then the vacancies of each column must be filled with k's (as many as necessary).
Also it's not allowed to have 2 k's one after the other in a ROW.
Case 2)
Every COLUMN of the array must be randomly filled with the letters a, b, c, d, e, f, g and h. Each column can only have each letter one time. If x is bigger than 8, then the vacancies of each column must be filled with k's (as many as necessary).
Also it's not allowed to have 2 k's one after the other in a ROW.
Does anybody know how I can make this very complex array?
Cindy
Comment