I want to create multidimensional Array with Random r = new Random();
Each element should be generated randomly but there must be all different elements. Non of them should be same. But also i can's use any function. Here is array but there are same elements. I want to all the elements were different.
for (int i=0; i<3; i++)
{
for(int j=0; j<4; j++)
{
arr[i, j] = rand.Next(1,25);
}
}
Aucun commentaire:
Enregistrer un commentaire