Hi I am very new to coding and was trying to figure out how to create a 2d array. That asks the user to input row and column size than fills those chosen row and column sizes with random numbers. After days of trying to figure it out I decided to come on here for help. Here is what I have so far, its all over the places I KNOW.
char row = 'i';
char column = 'j';
int[,] twoDarray = new int[row, column];
int min = 0;
int max = 100;
Random randNum = new Random();
for (int i = 0; i < twoDarray.Length; ++i)
for (int j = 0; j < twoDarray.Length; ++j)
{
twoDarray[i, j] = Convert.ToInt32(In.ReadLine());
}
Aucun commentaire:
Enregistrer un commentaire