using System.Security.Cryptography;
public static void Main()
Console.WriteLine("=====================================");
Console.WriteLine(" Student Grade Project ");
Console.WriteLine("=====================================");
Console.WriteLine("How Many Students? ");
int studentNum = int.Parse(Console.ReadLine());
Console.WriteLine("How Many Subjects?");
int subjectNum = int.Parse(Console.ReadLine());
string [] subject = new string[subjectNum];
string [] student = new string[studentNum];
int [,] studentGrade = new int[studentNum, subjectNum];
for (int x = 0; x < studentNum; x++)
Console.WriteLine($"Enter Student: ");
student[x] = (Console.ReadLine());
for (int y = 0; y < subjectNum; y++)
Console.WriteLine($"Enter Subject: ");
subject[y] = Console.ReadLine();
for (int x = 0; x < studentNum; x++)
for (int y = 0; y < subjectNum; y++)
Console.WriteLine($"{student[x]}'s {subject[y]} Grade: ");
int ans = int.Parse(Console.ReadLine());
if (ans < 101 && ans > -1)
studentGrade[x, y] = ans;
Console.WriteLine("Try Again");
Console.WriteLine("1 - Make a New List");
Console.WriteLine("2 - Average Grade");
Console.WriteLine("3 - Highest Grade");
Console.WriteLine("4 - Lowest Grade");
Console.WriteLine("5 - Display Grades");
Console.WriteLine("6 - Exit");
int num = int.Parse(Console.ReadLine());
averageSubject(studentGrade, subjectNum, studentNum, subject);
highestSubject(studentGrade, subjectNum, studentNum, subject);
lowestSubject(studentGrade, subjectNum, studentNum, subject);
displayTable(subject, student, studentGrade);
public static void highestSubject(int[, ] array, int top, int bot, string[] sub)
for (int x = 0; x < top; x++)
for (int y = 0; y < bot; y++)
Console.WriteLine($"{sub[x]} highest grade is {max}");
public static void lowestSubject(int[, ] array, int top, int bot, string[] sub)
for (int x = 0; x < top; x++)
for (int y = 0; y < bot; y++)
Console.WriteLine($"{sub[x]} lowest grade is {low}");
public static void averageSubject(int[, ] array, int top, int bot, string[] sub)
for (int x = 0; x < top; x++)
for (int y = 0; y < bot; y++)
Console.WriteLine($"{sub[x]} average is {avg}");
public static void displayTable(string [] sub, string [] student, int [,] grade)
int rowLength = grade.GetLength(0);
int colLength = grade.GetLength(1);
for (int i = 0; i < rowLength; i++)
for (int j = 0; j < colLength; j++)
Console.Write(string.Format("{0} ", grade[i, j]));
Console.Write(Environment.NewLine + Environment.NewLine);
public static void makeNewList()
Console.WriteLine("How Many Students? ");
int studentNum = int.Parse(Console.ReadLine());
Console.WriteLine("How Many Subjects?");
int subjectNum = int.Parse(Console.ReadLine());
string []subject = new string[subjectNum];
string [] student = new string[studentNum];
int [,] studentGrade = new int[studentNum, subjectNum];
for (int x = 0; x < studentNum; x++)
Console.WriteLine($"Enter Student: ");
student[x] = (Console.ReadLine());
for (int y = 0; y < subjectNum; y++)
Console.WriteLine($"Enter Subject: ");
subject[y] = Console.ReadLine();
for (int x = 0; x < studentNum; x++)
for (int y = 0; y < subjectNum; y++)
Console.WriteLine($"{student[x]}'s {subject[y]} Grade: ");
int ans = int.Parse(Console.ReadLine());
if (ans < 101 && ans > -1)
studentGrade[x, y] = ans;
Console.WriteLine("Try Again");