This document contains code for a program that allows a user to input student names and grades into a grid. It calculates the average grade for each student and displays it in the grid. It also counts how many students received over 10.5 as their average and displays the highest average score and corresponding student name. The code gets student names and grades from input boxes, calculates averages, and populates the grid with the data for analysis.
This document contains code for a program that allows a user to input student names and grades into a grid. It calculates the average grade for each student and displays it in the grid. It also counts how many students received over 10.5 as their average and displays the highest average score and corresponding student name. The code gets student names and grades from input boxes, calculates averages, and populates the grid with the data for analysis.
This document contains code for a program that allows a user to input student names and grades into a grid. It calculates the average grade for each student and displays it in the grid. It also counts how many students received over 10.5 as their average and displays the highest average score and corresponding student name. The code gets student names and grades from input boxes, calculates averages, and populates the grid with the data for analysis.
dgvmatris.Rows(fila).Cells(2).Value = n1 n2 = InputBox(fila + 1, "ingrese nota2") dgvmatris.Rows(fila).Cells(3).Value = n2 n3 = InputBox(fila + 1, "ingrese nota3") dgvmatris.Rows(fila).Cells(4).Value = n3 6: pro(fila) = Math.Round((n1 + n2 + n3) / 3, 1) dgvmatris.Rows(fila).Cells(5).Value = pro(fila) If pro(fila) >= 10.5 Then ka = ka + 1 End If If pro(fila) >= may Then may = pro(fila) f = fila End If Next lblapro.Text = ka lblmay.Text = may lblnom.Text = Nom(f) End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load Butejecutar.Enabled = False End Sub
Private Sub nutfilas_ValueChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles nutfilas.ValueChanged Butejecutar.Enabled = True End Sub End Class