VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00FFC0C0&
   Caption         =   "Comp 1 10б"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5205
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   5205
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   2400
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Выход"
      BeginProperty Font 
         Name            =   "MS Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3120
      TabIndex        =   0
      Top             =   2160
      Width           =   1335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a(1 To 3, 1 To 4) As Integer
Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
For i = 1 To 3
For j = 1 To 4
a(i, j) = Int(Rnd * 10)
Form1.Print a(i, j);
Next
Form1.Print
Next
Max = a(1, 1)
For i = 1 To 3
For j = 1 To 4
If Max < a(i, j) Then Max = a(i, j)
Next
Next
Form1.Print Max, Sqr(Max)
End Sub
