VERSION 5.00 Begin VB.Form Form1 BackColor = &H00FFFF00& Caption = "Summa" ClientHeight = 2775 ClientLeft = 2985 ClientTop = 3015 ClientWidth = 6135 Icon = "SUMMA.frx":0000 LinkTopic = "Form1" ScaleHeight = 2775 ScaleWidth = 6135 Begin VB.CommandButton Command2 Cancel = -1 'True Caption = "В&ыход" Height = 495 Left = 4680 TabIndex = 1 ToolTipText = "Для завершения работы программы нажмите кнопку ""Выход""" Top = 2160 Width = 1335 End Begin VB.CommandButton Command1 Caption = "Выч&ислить" Default = -1 'True Height = 495 Left = 4680 TabIndex = 0 ToolTipText = "Для вычисления конечной суммы данного ряла, нажмите кнопку ""Вычислить""" Top = 1440 Width = 1335 End Begin VB.Line Line6 X1 = 6120 X2 = 6120 Y1 = 0 Y2 = 2760 End Begin VB.Line Line5 X1 = 0 X2 = 0 Y1 = 0 Y2 = 2760 End Begin VB.Line Line4 X1 = 0 X2 = 6120 Y1 = 2760 Y2 = 2760 End Begin VB.Line Line3 X1 = 0 X2 = 6120 Y1 = 2040 Y2 = 2040 End Begin VB.Line Line2 X1 = 0 X2 = 6120 Y1 = 1320 Y2 = 1320 End Begin VB.Line Line1 X1 = 0 X2 = 6120 Y1 = 0 Y2 = 0 End Begin VB.Label Label2 BackColor = &H00FFFF00& Caption = "Для вычисления конечной суммы данного ряла, нажмите кнопку ""Выч&ислить"" и Вы получите "" О Т В Е Т "" ." Height = 495 Left = 120 TabIndex = 5 ToolTipText = "Условие" Top = 1320 Width = 4455 End Begin VB.Label Label3 BackColor = &H00FFFF00& Caption = "Для завершения работы программы нажмите кнопку ""В&ыход""." Height = 495 Left = 120 TabIndex = 4 ToolTipText = "Условие" Top = 2160 Width = 4455 End Begin VB.Label Label4 Alignment = 2 'Center BackColor = &H00FFFF00& Caption = " О Т В Е Т" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FF0000& Height = 255 Left = 120 TabIndex = 3 ToolTipText = "Ответ" Top = 1800 Width = 4455 End Begin VB.Image Image1 Height = 450 Left = 4080 Picture = "SUMMA.frx":0442 Top = 0 Width = 600 End Begin VB.Label Label1 BackColor = &H00FFFF00& Caption = $"SUMMA.frx":1294 Height = 1215 Left = 120 TabIndex = 2 ToolTipText = "Задание" Top = 120 Width = 5895 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Function fac(x) fac = 1 For t = 1 To x fac = fac * t Next End Function Private Sub Command1_Click() s = 0 e = Val(InputBox("Введите точность", "Ввод начальных значений", ".00001")) n = 0 Do s = s + 1 sd = 1 / fac(s * 2) n = n + sd Loop While (Abs(sd) > e) Label4 = Format(n, "#0.##########") & "; " & Format(s, "#0.##") End Sub Private Sub Command2_Click() End End Sub