-
New dude needs help
Hi could someone help me with a code of mine? its a 4x6 array and i wish to delete the secound row pls help my code
Code:
static void Main(string[] args)
{
int[,] m = new int[4, 6];
Random r = new Random();
for (int i = 0; i < 4; i++)
for (int j = 0; j < 6; j++)
m[i, j] = r.Next(1, 150);
double s = 0;
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 6; j++)
{
Console.Write("{0,5}", m[i,j]);
}
Console.WriteLine();
}
Console.ReadKey();
}
-
Are you looking to just not print the second row, or are you trying to create a new new int[3, 6]; ?
-
Not to print the secound row
-
Add in a line somewhere like
if ( i != 2 )
-