Public Dim notas As Double(,)
Public Dim estudiantes As String()
Public Dim i, j As Integer
Dim nEstudiantes As Integer
Console.Write("Digite el numero de estudiantes: ")
nEstudiantes = Console.ReadLine()
notas = New Double(nEstudiantes, 3) {}
estudiantes = New String(nEstudiantes) {}
Public Sub Menu(n As Integer)
Console.WriteLine("Seleccione una opcion:")
Console.WriteLine("1. Ingresar las notas.")
Console.WriteLine("2. Mostrar las notas.")
Console.WriteLine("3. Salir.")
Console.WriteLine("Opcion invalida.")
Public Sub IngresarNotas(n As Integer)
For i = 0 To n - 1 Step 1
Console.Write("Digite el nombre del estudiante con id " & i+1 & ": ")
nombre = Console.ReadLine()
Console.Write("Digite la nota del parcial 1 del estudiante con id " & i+1 & ": ")
Console.WriteLine("La nota no puede ser mayor que 5")
Console.Write("Digite la nota del parcial 2 del estudiante con id " & i+1 & ": ")
Console.WriteLine("La nota no puede ser mayor que 5")
Console.Write("Digite la nota del parcial 3 del estudiante con id " & i+1 & ": ")
Console.WriteLine("La nota no puede ser mayor que 5")
notas(i, 3) = (p1+p2+p3)/3
Public Sub MostrarNotas(n As Integer)
Console.WriteLine("ID | Nombre | p1 | p2 | p3 | promedio")
For i = 0 To n - 1 Step 1
Console.Write(i+1 & " | " & estudiantes(i) & " | ")
Console.Write(notas(i,j) & " | ")