VERSION 5.00 Begin VB.Form Form1 BackColor = &H00FFFF00& Caption = "Chisla" ClientHeight = 4695 ClientLeft = 2985 ClientTop = 2010 ClientWidth = 6375 FillColor = &H80000012& Icon = "Chisla.frx":0000 LinkTopic = "Form1" ScaleHeight = 4695 ScaleWidth = 6375 Begin VB.TextBox Text1 Height = 375 Left = 4680 TabIndex = 9 Text = "Количество замен" ToolTipText = "Количество замен" Top = 3360 Width = 1575 End Begin VB.PictureBox Picture1 Height = 375 Left = 120 ScaleHeight = 315 ScaleWidth = 4395 TabIndex = 4 ToolTipText = "Ввод/вывод последовательности чисел" Top = 3360 Width = 4455 End Begin VB.CommandButton Command4 Cancel = -1 'True Caption = "В&ыход" Height = 375 Left = 4800 TabIndex = 3 ToolTipText = "Для завершения работы программы нажмите кнопку ""Выход""" Top = 3960 Width = 1455 End Begin VB.CommandButton Command3 Caption = "П&одсчитать" Height = 375 Left = 3240 TabIndex = 2 ToolTipText = $"Chisla.frx":030A Top = 3960 Width = 1455 End Begin VB.CommandButton Command2 Caption = "Зам&енить" Height = 375 Left = 1680 TabIndex = 1 ToolTipText = "Для замены всех чисел данной последовательности, которые больше числа Z, нажмите кнопку ""Заменить""" Top = 3960 Width = 1455 End Begin VB.CommandButton Command1 Caption = "В&вод" Height = 375 Left = 120 TabIndex = 0 ToolTipText = "Для ввода последовательности чисел a1, a2, ..., an нажмите кнопку ""Ввод""" Top = 3960 Width = 1455 End Begin VB.Line Line8 BorderWidth = 2 X1 = 0 X2 = 6360 Y1 = 4680 Y2 = 4680 End Begin VB.Line Line10 X1 = 6360 X2 = 6360 Y1 = 0 Y2 = 4680 End Begin VB.Line Line9 BorderWidth = 2 X1 = 0 X2 = 0 Y1 = 0 Y2 = 4680 End Begin VB.Line Line7 BorderWidth = 2 X1 = 0 X2 = 6360 Y1 = 4320 Y2 = 4320 End Begin VB.Label Label6 Alignment = 2 'Center BackColor = &H00FFFF00& Caption = "Для завершения работы программы нажмите кнопку ""В&ыход""." BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00404000& Height = 255 Left = 120 TabIndex = 11 Top = 4440 Width = 6135 End Begin VB.Line Line6 BorderWidth = 2 X1 = 0 X2 = 6360 Y1 = 3840 Y2 = 3840 End Begin VB.Label Label5 BackColor = &H00FFFF00& Caption = $"Chisla.frx":0392 BeginProperty Font Name = "Arial" Size = 8.25 Charset = 204 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 615 Left = 120 TabIndex = 10 ToolTipText = "Условие" Top = 2640 Width = 6135 End Begin VB.Line Line3 X1 = 0 X2 = 6360 Y1 = 1920 Y2 = 1920 End Begin VB.Line Line5 BorderWidth = 2 X1 = 0 X2 = 6360 Y1 = 3240 Y2 = 3240 End Begin VB.Line Line4 X1 = 0 X2 = 6360 Y1 = 2520 Y2 = 2520 End Begin VB.Line Line2 BorderWidth = 2 X1 = 0 X2 = 6360 Y1 = 1080 Y2 = 1080 End Begin VB.Line Line1 BorderWidth = 2 X1 = 0 X2 = 6360 Y1 = 0 Y2 = 0 End Begin VB.Label Label4 BackColor = &H00FFFF00& Caption = $"Chisla.frx":044D BeginProperty Font Name = "Arial" Size = 8.25 Charset = 204 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 615 Left = 120 TabIndex = 8 ToolTipText = "Условие" Top = 1920 Width = 6135 End Begin VB.Label Label3 BackColor = &H00FFFF00& Caption = $"Chisla.frx":0518 BeginProperty Font Name = "Arial" Size = 8.25 Charset = 204 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 855 Left = 120 TabIndex = 7 ToolTipText = "Условие" Top = 1080 Width = 6135 End Begin VB.Label Label2 BackColor = &H00FFFF00& Caption = $"Chisla.frx":0640 BeginProperty Font Name = "Times New Roman" Size = 9.75 Charset = 204 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H00008000& Height = 735 Left = 120 TabIndex = 6 ToolTipText = "Задание" Top = 360 Width = 6135 End Begin VB.Label Label1 Alignment = 2 'Center BackColor = &H00FFFF00& Caption = "Вас приветствует программа ""Chisla""!!!" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 204 Weight = 700 Underline = -1 'True Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H8000000D& Height = 375 Left = 600 TabIndex = 5 Top = 0 Width = 5175 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim n As Integer Dim k As Integer Dim A(1 To 100) As Double Private Sub Command1_Click() Picture1.Cls n = Val(InputBox("Введите количество членов последовательности - число n.", "Ввод количества чисел последовательности", "5")) A1 = Split(InputBox("Введите последовательность действительных" & Chr(13) & Chr(10) & "чисел от a1 до a" & n & ". Между числами используйте" & Chr(13) & Chr(10) & "пробел как разделитель.", "Ввод последовательности чисел"), " ") k = 0 For i = 1 To n A(i) = Val(A1(i - 1)) Picture1.Print A(i); " "; Next End Sub Private Sub Command2_Click() Picture1.Cls z = Val(InputBox("Введите некоторое число Z, которым вы хотите заменить числа заданной последовательность.", "Ввод числа Z", "5")) For i = 1 To n If A(i) > z Then A(i) = z k = k + 1 End If Next For i = 1 To n Picture1.Print A(i); " "; Next End Sub Private Sub Command3_Click() Text1.Text = " " Text1.Text = k End Sub Private Sub Command4_Click() End End Sub