VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00FFFFFF&
   Caption         =   "Поиск в числовом массиве"
   ClientHeight    =   2496
   ClientLeft      =   3828
   ClientTop       =   3456
   ClientWidth     =   4704
   BeginProperty Font 
      Name            =   "Times New Roman"
      Size            =   12
      Charset         =   204
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   2496
   ScaleWidth      =   4704
   Begin VB.CommandButton cmd2 
      Caption         =   "Найти Min элемент"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   10.2
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   612
      Left            =   2760
      TabIndex        =   1
      Top             =   1560
      Width           =   1332
   End
   Begin VB.CommandButton cmd1 
      Caption         =   "Заполнить массив"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   10.2
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   612
      Left            =   600
      TabIndex        =   0
      Top             =   1560
      Width           =   1332
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bytA(1 To 100), bytI, bytN, bytMin As Byte
Sub cmd1_Click()
For bytI = 1 To 100
bytA(bytI) = Int(Rnd * 100)
Next bytI
End Sub
Sub cmd2_Click()
'Поиск минимального элемента
bytMin = bytA(1)
For bytI = 2 To 100
If bytA(bytI) < bytMin Then bytMin = bytA(bytI): bytN = bytI
Next bytI
frm1.Print "Минимальный элемент  "; bytMin; "его индекс"; bytN
End Sub


