VERSION 5.00 Begin VB.Form Form1 Caption = "Zikl" ClientHeight = 4095 ClientLeft = 2655 ClientTop = 2340 ClientWidth = 6675 Icon = "Zikl.frx":0000 LinkTopic = "Form1" ScaleHeight = 4095 ScaleWidth = 6675 Begin VB.CommandButton Command2 Cancel = -1 'True Caption = "В&ыход" Height = 390 Left = 3000 TabIndex = 5 ToolTipText = "Для завершения работы программы нажмите кнопку ""Выход""" Top = 3600 Width = 2355 End Begin VB.CommandButton Command1 Caption = "Выч&ислить" Default = -1 'True Height = 390 Left = 3000 TabIndex = 4 ToolTipText = "Чтобы найти число повторений цикла, для вычисления данной функции, нажмите кнопку ""Вычислить""" Top = 2520 Width = 2355 End Begin VB.TextBox Text4 Height = 2205 Left = 120 MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 3 ToolTipText = "Результат" Top = 1800 Width = 1395 End Begin VB.TextBox Text3 BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 5160 TabIndex = 2 Text = "0.1" ToolTipText = "Шаг - h" Top = 1320 Width = 1215 End Begin VB.TextBox Text2 BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 3360 TabIndex = 1 Text = "1" ToolTipText = "Конец отрезка - точка B" Top = 1320 Width = 1215 End Begin VB.TextBox Text1 BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1560 TabIndex = 0 Text = "0" ToolTipText = "Начало отрезка - точка A" Top = 1320 Width = 1215 End Begin VB.Line Line5 BorderColor = &H00C00000& BorderWidth = 2 X1 = 120 X2 = 6500 Y1 = 4080 Y2 = 4080 End Begin VB.Line Line4 BorderColor = &H00C00000& BorderWidth = 2 X1 = 1680 X2 = 6500 Y1 = 3000 Y2 = 3000 End Begin VB.Label Label7 Caption = "Для завершения работы программы нажмите кнопку ""В&ыход""." BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 1800 TabIndex = 12 ToolTipText = "Условие" Top = 3000 Width = 4575 End Begin VB.Label Label6 Caption = "Чтобы найти число повторений цикла, для вычисления данной функции, нажмите кнопку ""Выч&ислить""." BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 1800 TabIndex = 11 ToolTipText = "Условие" Top = 1800 Width = 4575 End Begin VB.Line Line3 BorderColor = &H00C00000& BorderWidth = 2 X1 = 120 X2 = 6500 Y1 = 1680 Y2 = 1680 End Begin VB.Label Label5 Caption = ", h =" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 4680 TabIndex = 10 Top = 1320 Width = 375 End Begin VB.Line Line2 BorderColor = &H00C00000& BorderWidth = 2 X1 = 120 X2 = 6500 Y1 = 0 Y2 = 0 End Begin VB.Line Line1 BorderColor = &H00C00000& BorderWidth = 2 X1 = 120 X2 = 6500 Y1 = 1080 Y2 = 1080 End Begin VB.Label Label4 Caption = ", B =" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 2880 TabIndex = 9 Top = 1320 Width = 435 End Begin VB.Label Label3 Caption = "A =" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 1200 TabIndex = 8 Top = 1320 Width = 315 End Begin VB.Image Image1 Height = 285 Left = 4320 Picture = "Zikl.frx":0442 ToolTipText = "Функция" Top = 240 Width = 1650 End Begin VB.Label Label2 Caption = "Введите значение границ отрезка AB и шаг (по умолчанию A=0, B=1, h=0.1):" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 120 TabIndex = 7 ToolTipText = "Условие" Top = 1080 Width = 6435 End Begin VB.Label Label1 Caption = $"Zikl.frx":1D28 BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 975 Left = 120 TabIndex = 6 ToolTipText = "Задание" Top = 0 Width = 6435 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim s As String Dim h Private Sub Command1_Click() a = Val(Text1) b = Val(Text2) h = Val(Text3) Text4 = "" s = "" If b <= a Or h < 0 Or b > 1 Then MsgBox "Неверный ввод!!! Введите заново!!!", vbCritical, "Ошибка ввода/вывода" GoTo 1 End If k = InputBox("Подсчитать число повторений цикла с помощью функции FIX? Y - да, N - нет.", "Способ подсчёта", "Y") If k = "y" Then x = a - h For i = 0 To Fix((b - a) / h) x = x + h y = Sqr(1 - x) - Cos(Sqr(1 - x)) s = s + "(" + Format(x, "0.###") + "; " + Str(Fix(y)) + ")" + Chr(13) + Chr(10) Text4 = s Next Else For i = a To b Step h y = Sqr(1 - x) - Cos(Sqr(1 - x)) s = s + "(" + Format(i, "0.###") + "; " + Str(Fix(y)) + ")" + Chr(13) + Chr(10) Text4 = s Next End If 1 End Sub Private Sub Command2_Click() End End Sub