VERSION 5.00 Begin VB.Form Form3 BackColor = &H00C0C0FF& Caption = "Ввод данных" ClientHeight = 3090 ClientLeft = 60 ClientTop = 450 ClientWidth = 4680 BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty LinkTopic = "Form3" ScaleHeight = 3090 ScaleWidth = 4680 StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command1 Caption = "OK" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 2160 TabIndex = 6 Top = 2400 Width = 975 End Begin VB.TextBox Text3 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 2520 TabIndex = 5 Top = 1680 Width = 855 End Begin VB.TextBox Text2 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 2520 TabIndex = 1 Top = 960 Width = 855 End Begin VB.TextBox Text1 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 2520 TabIndex = 0 Top = 120 Width = 855 End Begin VB.Label Label3 BackColor = &H00C0FFC0& Caption = "Количество разбиений" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 360 TabIndex = 4 Top = 1680 Width = 1695 End Begin VB.Label Label2 BackColor = &H00C0FFC0& Caption = "Ввод конца отрезка" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 360 TabIndex = 3 Top = 840 Width = 1695 End Begin VB.Label Label1 BackColor = &H00C0FFC0& Caption = "Ввод начала отрезка" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 360 TabIndex = 2 Top = 120 Width = 1695 End End Attribute VB_Name = "Form3" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Command1_Click() a = Val(Text1.Text) b = Val(Text2.Text) k = Val(Text3.Text) If a < 1 Then b = MsgBox("Ввели неподходящее значение." + _ vbLf + "Введите значение из отрезка [1..9].", _ vbYesNo + vbQuestion) If b = vbNo Then Form3.Hide Form1.Show Else: Text1 = "": Exit Sub End If End If If a > 10 Then b = MsgBox("Ввели неподходящее значение." + _ vbLf + "Введите значение из отрезка [1..9].", _ vbYesNo + vbQuestion) If b = vbNo Then Form3.Hide Form1.Show Else: Text1 = "": Exit Sub End If End If If b < 1 Then b = MsgBox("Ввели неподходящее значение." + _ vbLf + "Введите значение из отрезка [1..9].", _ vbYesNo + vbQuestion) If b = vbNo Then Form3.Hide Form1.Show Else: Text2 = "": Exit Sub End If End If If b > 10 Then b = MsgBox("Ввели неподходящее значение." + _ vbLf + "Введите значение из отрезка [1..9].", _ vbYesNo + vbQuestion) If b = vbNo Then Form3.Hide Form1.Show Else: Text2 = "": Exit Sub End If End If If a > b Then b = MsgBox("Ввели неподходящие значения." + _ vbLf + "Введите значения так,чтобы a 25 Then b = MsgBox("Ввели неподходящее значение." + _ vbLf + "Введите значение из отрезка [4,25].", _ vbYesNo + vbQuestion) If b = vbNo Then Form3.Hide Form1.Show Else: Text3 = "": Exit Sub End If End If Form3.Hide Form1.Show End Sub