VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00404000&
   Caption         =   "Пузырьковая сортировка"
   ClientHeight    =   3555
   ClientLeft      =   3360
   ClientTop       =   2835
   ClientWidth     =   5850
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   9.75
      Charset         =   204
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H00FFFFFF&
   LinkTopic       =   "Form1"
   ScaleHeight     =   3555
   ScaleWidth      =   5850
   Begin VB.TextBox txtDim 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2175
      Left            =   360
      MultiLine       =   -1  'True
      TabIndex        =   3
      Top             =   240
      Width           =   2415
   End
   Begin VB.CommandButton cmdDim 
      Caption         =   "Заполнить массив"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   720
      TabIndex        =   2
      Top             =   2760
      Width           =   1695
   End
   Begin VB.TextBox txtSort 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2175
      Left            =   3120
      MultiLine       =   -1  'True
      TabIndex        =   1
      Top             =   240
      Width           =   2415
   End
   Begin VB.CommandButton cmdSort 
      Caption         =   "Сортировать"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3600
      TabIndex        =   0
      Top             =   2760
      Width           =   1575
   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 10), bytMin, bytI, bytJ, bytK, bytR, bytN As Byte
Private Sub cmdDim_Click()
'заполнение массива
Randomize
For bytI = 1 To 10
bytA(bytI) = Int(Rnd * 10)
txtDim.Text = txtDim.Text + Str(bytA(bytI))
Next bytI
End Sub
Private Sub cmdSort_Click()
For bytI = 1 To 10
For bytJ = bytI + 1 To 10
If bytA(bytI) > bytA(bytJ) Then bytR = bytA(bytI): bytA(bytI) = bytA(bytJ): bytA(bytJ) = bytR
Next bytJ
txtSort.Text = txtSort.Text + Str(bytA(bytI))
Next bytI
End Sub


