using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int NG = 0, NoAlu = 0, mat = 0;
int suma = 0;
double promedio = 0;
Console.Write("\nCaptura numero de grupos: ");
NG = System.Int32.Parse(Console.ReadLine());
Console.Write("\nCaptura numero de alumnos: ");
NoAlu = System.Int32.Parse(Console.ReadLine());
Console.Write("\nCaptura numero de materias por alumno: ");
mat = System.Int32.Parse(Console.ReadLine());
int[, ,] kodex = new int[NG, NoAlu, mat];
for (int g = 0; g < NG; g++)
{
for (int a = 0; a < NoAlu; a++)
{
Console.Clear();
Console.WriteLine("Las calificaciones de los alumnos del grupo son{0}:", g + 1);
for (int m = 0; m < mat; m++)
{
Console.Write("\nintroduce calificacion {0} de alumno {1}: ", m + 1, a + 1);
kodex[g, a, m] = System.Int32.Parse(Console.ReadLine());
}
}
}
for (int g = 0; g < NG; g++)
{
Console.WriteLine("\nPromedio de los alumnosdel grupo{0}:", g + 1);
for (int a = 0; a < NoAlu; a++)
{
suma = 0;
for (int m = 0; m < mat; m++)
suma = suma + kodex[g, a, m];
{
promedio = suma / mat;
Console.WriteLine("Promedio de alumno{0}: {1}", a + 1, promedio);
}
}
Console.ReadLine();
}
}
}
}

