I want to know logic over how to select six random numbers between 0 to 8 ,where if (0,1) or (1,2) or (0,2) got select then the remaining one number out of 0 to 2 shall not be selected again same goes for 3 to 5 series if (3,5) or (3,4) or (4,5) got selected then remaining one number shall not be selected.
So for example in series 0 to 8 six number can be (0,1,3,5,6,8) or (1,2,4,5,7,8) etc
You didn’t post any code, so I’ll just give you a brief rundown in sudo code to get you started.
List<int> results = new List<int>();
for (numberOfResultsYouWant){
potentialNumber = //new random number
while(potentialNumberIsARepeat)
{
//Get a new random number
}
// Add potential number to results as we know it isn't in the results set.
}
Just some sudo code. RandomNumberGenerator doesn’t exist but it should give you a good idea of what you want to do. Try writing some code next time so we can get a better idea of what you want.