Private Type typeStudent
StudentFIO As String
Mark(1 To 4) As Integer
MarkIstoriya As Integer
MarkMatematika As Integer
MarkInformatika As Integer
MarkPhysic As Integer
MarkSrednee As Integer
BornDate As Date
End Type
Dim Student(1 To 10) As typeStudent
Dim i As Integer
Private Sub Command1_Click()
Student(1).StudentFIO = "Марченко Маргарита Николаевна"
Student(2).StudentFIO = "Шеремет Алёна Игоревна"
Student(3).StudentFIO = "Никитин Данил Сергеевич"
Student(4).StudentFIO = "Павлова Анна Николаевна"
Student(5).StudentFIO = "Семенова Ирина Дмитриевна"
Student(6).StudentFIO = "Загороднюк Вика Денисовна"
Student(7).StudentFIO = "Зайцева Елена Олеговна"
Student(8).StudentFIO = "Петров Илья Максимович"
Student(9).StudentFIO = "ГЌНиколайчук Екатерина Евгеньевна"
Student(10).StudentFIO = "Доценко Михаил Сергеевич"
Student(1).MarkIstoriya = 4
Student(1).MarkMatematika = 4
Student(1).MarkInformatika = 4
Student(1).MarkPhysic = 3
Student(2).MarkIstoriya = 5
Student(2).MarkMatematika = 4
Student(2).MarkInformatika = 4
Student(2).MarkPhysic = 4
Student(3).MarkIstoriya = 5
Student(3).MarkMatematika = 4
Student(3).MarkInformatika = 2
Student(3).MarkPhysic = 3
Student(4).MarkIstoriya = 1
Student(4).MarkMatematika = 4
Student(4).MarkInformatika = 1
Student(4).MarkPhysic = 2
Student(5).MarkIstoriya = 5
Student(5).MarkMatematika = 4
Student(5).MarkInformatika = 5
Student(5).MarkPhysic = 3
Student(6).MarkIstoriya = 3
Student(6).MarkMatematika = 2
Student(6).MarkInformatika = 5
Student(6).MarkPhysic = 4
Student(7).MarkIstoriya = 5
Student(7).MarkMatematika = 5
Student(7).MarkInformatika = 4
Student(7).MarkPhysic = 4
Student(8).MarkIstoriya = 5
Student(8).MarkMatematika = 5
Student(8).MarkInformatika = 5
Student(8).MarkPhysic = 5
Student(9).MarkIstoriya = 4
Student(9).MarkMatematika = 4
Student(9).MarkInformatika = 4
Student(9).MarkPhysic = 4
Student(10).MarkIstoriya = 3
Student(10).MarkMatematika = 3
Student(10).MarkInformatika = 3
Student(10).MarkPhysic = 3
Student(1).BornDate = #12/12/1994#
Student(2).BornDate = #11/10/1995#
Student(3).BornDate = #8/31/1994#
Student(4).BornDate = #3/5/1993#
Student(5).BornDate = #4/16/1994#
Student(6).BornDate = #5/17/1993#
Student(7).BornDate = #10/23/1995#
Student(8).BornDate = #3/6/1994#
Student(9).BornDate = #8/7/1993#
Student(10).BornDate = #10/28/1993#
For i = 1 To 10
Student(i).MarkSrednee = (Student(i).MarkIstoriya + Student(i).MarkMatematika + Student(i).MarkInformatika + Student(i).MarkPhysic) / 4
Next i
If i < 10 Then i = i + 1
List2.AddItem ("ФИО " + Student(i).StudentFIO)
List2.AddItem ("дата рождения " + Student(i).BornDate)
List2.AddItem ("история " + Student(i).MarkIstoriya)
List2.AddItem ("математика " + Student(i).MarkMatematika)
List2.AddItem ("информатика " + Student(i).MarkInformatika)
List2.AddItem ("физикаГ* " + Student(i).MarkPhysic)
List2.AddItem ("средняя оценка " + Student(i).MarkSrednee)
List2.AddItem (" ")
List1.Clear
If i = 10 Then
List1.AddItem ("выборка...")
List1.AddItem ("список студентов оценка которых меньше 4")
For i = 1 To 10
Next i
If (Student(i).MarkSrednee < 4) Then
List1.AddItem ("ФИО " + Student(i).StudentFIO + "дата рождения " + Student(i).MarkSrednee)
End If
End Sub
' распечатать список студентов средний балл которых меньше 4