I got two question here.
First: I want to randomly choose
two values from this list below for each row.
{{ 0, 4, 8, 9, 5, 11, 10, 12, 7, 3, 6, 0, 0 } ,
{ 0, 10, 11, 9, 8, 5, 4, 7, 3, 6, 12, 0, 0 } ,
{ 0, 0, 8, 9, 5, 4, 11, 10, 12, 7, 3, 6, 0 }}
I had try with the code and run several time. Sometimes appear number i don't want. The random chosen number should be between 3-12 (not 0, 1 and 2). The chosen number 1 and chosen number 2 can't be the same number.
Second question:
For example, if the randomly chosen numbers is 8 and 10. How can i move 10 beside 8. Is there any way to do it. |
{ 0, 4,
8, 9, 5, 11,
10, 12, 7, 3, 6, 0, 0 } ,
How can I move 10 beside 8. I don't have idea to do it.
The answer should be
{ 0, 4,
8,
10, 9, 5, 11, 12, 7, 3, 6, 0, 0 } ,
Hopefully you understand what i'm trying to ask.