VERSION 5.00 Begin VB.Form Form1 BackColor = &H80000003& BorderStyle = 0 'None Caption = "Ekzamen" ClientHeight = 2055 ClientLeft = 0 ClientTop = 0 ClientWidth = 4695 Icon = "Ekzamen.frx":0000 LinkTopic = "Form1" ScaleHeight = 2055 ScaleWidth = 4695 StartUpPosition = 2 'CenterScreen Begin VB.CommandButton Command6 Caption = "Ответ" Enabled = 0 'False Height = 255 Left = 2400 TabIndex = 1 ToolTipText = "Ответ" Top = 600 Width = 2175 End Begin VB.CommandButton Command5 Caption = "Получить результат" Enabled = 0 'False Height = 255 Left = 120 TabIndex = 2 ToolTipText = "Получить результат" Top = 1680 Width = 4455 End Begin VB.CommandButton Command4 Caption = "Пройти экзамен" Default = -1 'True Height = 255 Left = 120 TabIndex = 0 ToolTipText = "Пройти экзамен" Top = 600 Width = 2175 End Begin VB.CommandButton Command3 Enabled = 0 'False Height = 1575 Left = 0 TabIndex = 6 Top = 480 Width = 4695 End Begin VB.CommandButton Command2 Caption = "_" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 3960 TabIndex = 3 ToolTipText = "Свернуть" Top = 120 Width = 255 End Begin VB.CommandButton Command1 Cancel = -1 'True Caption = "X" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 4320 TabIndex = 4 ToolTipText = "Выход" Top = 120 Width = 255 End Begin VB.Image Image1 Height = 255 Left = 120 Picture = "Ekzamen.frx":0442 Stretch = -1 'True Top = 120 Width = 255 End Begin VB.Label Label1 BackColor = &H80000002& BorderStyle = 1 'Fixed Single Caption = " Вступительный экзамен" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000009& Height = 375 Left = 60 TabIndex = 5 Top = 60 Width = 4575 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim Mass(2, 2) As Integer Dim s, k As String Dim Max, Min, n, Ball As Integer Dim Ansvert, X As Double Private Sub Command1_Click() End End Sub Private Sub Command2_Click() Form1.WindowState = 1 End Sub Private Sub Command4_Click() n = n + 1 If Command4.Caption = "Пройти экзамен" And Command4.ToolTipText = "Пройти экзамен" Then n = 1 Ball = 0 Command5.Enabled = False End If k = "" For i = 0 To 2 s = "" For j = 0 To 2 Mass(i, j) = Rnd * 10 If i = 0 And j = 0 Then Max = Mass(i, j) Min = Mass(i, j) ElseIf Mass(i, j) > Max Then Max = Mass(i, j) ElseIf Mass(i, j) < Min Then Min = Mass(i, j) End If s = s & " " & Mass(i, j) Next k = k & Chr(13) & Chr(10) & s Next X = (Max + Min) / 2 Command6.Enabled = True Command3.Caption = k Command4.Enabled = False Command4.Caption = "Следующий пример" Command4.ToolTipText = "Следующий пример" End Sub Private Sub Command5_Click() If Ball >= 13 Then MsgBox "Вы имеете право поступить на дневное отделение" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Набрано баллов: " & Ball, , "Тестирование успешно пройдено" ElseIf Ball >= 10 Then MsgBox "Вы имеете право поступить на вечернее отделение" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Набрано баллов: " & Ball, , "Тестирование успешно пройдено" ElseIf Ball >= 8 Then MsgBox "Вы имеете право поступить на заочное отделение" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Набрано баллов: " & Ball, , "Тестирование успешно пройдено" Else MsgBox "Вам отказано в приёме на учебу" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Набрано баллов: " & Ball, vbCritical, "Тестирование не пройдено" End If Command4.Enabled = True End Sub Private Sub Command6_Click() Ansvert = Val(InputBox("Введите ответ", "Ввод ответа", 0)) Command6.Enabled = False Command4.Enabled = True If Ansvert = X Then Ball = Ball + 2 If n = 8 Then Command4.Caption = "Пройти экзамен" Command4.Enabled = False Command5.Enabled = True Command3.Caption = "" End If Command4.TabIndex = 0 End Sub