Hello, I'm confused on how to put the Random.Next() method into my matrix array. First my matrix array is already messed up, I'm trying to create a 6 by 10 matrix of random numbers and then show the numbers times two. here is the code i've already done, ps my code for some reason keeps shutting down my computer as well. this is for an online class so i'm new at learning this. any help would be awesome. thanks.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace week0801
{
class Program
{
static void Main(string[] args)
{
int[,] firstArray;
firstArray = new int[6, 10];
Console.WriteLine("Load the Matrix");
for (int i = 0; i < firstArray.Length; i++)
Console.WriteLine("{0} ", firstArray[i, i]);
FirstDouble(firstArray);
Console.WriteLine();
Console.WriteLine("Matrix times two");
for (int i = 0; i < firstArray.Length; i++)
Console.Write("{0} ", firstArray[i, i]);
}
public static void FirstDouble(int[,] array)
{
for (int i = 0; i < array.Length; i++)
array[i, i] *= 2;
}
}
}