public static double[] arrayAvg(double[, ] a)
double[] tempArray = new double[a.GetLength(0)];
for (int i = 0; i < a.GetLength(0); i++)
for (int j = 0; j < a.GetLength(1); j++)
double avg = sum / (a.GetLength(1) );
public static void Main()
Console.WriteLine("Please enter the amount of students you have.");
int students= int.Parse(Console.ReadLine());
string[] names = new string[students];
Console.WriteLine("Please enter each student's name individually, by pressing enter after each one.");
for(int i = 0;i<names.Length;i++)
names[i] = Console.ReadLine();
Console.WriteLine("How many grades are there for each student?");
int gradeAmount = int.Parse(Console.ReadLine());
double [,] grades = new double[students,gradeAmount];
for(int i = 0; i<grades.GetLength(0);i++)
Console.WriteLine("Please enter the grades for "+i);
for(int j =0;j<grades.GetLength(1);j++)
grades[i,] = double.Parse(Console.ReadLine());