VERSION 5.00
Begin VB.Form dodavdec 
   AutoRedraw      =   -1  'True
   BackColor       =   &H00FFFFC0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Додавання і віднімання десяткових дробів"
   ClientHeight    =   8670
   ClientLeft      =   2040
   ClientTop       =   1620
   ClientWidth     =   9375
   FillStyle       =   0  'Solid
   BeginProperty Font 
      Name            =   "Times New Roman"
      Size            =   9.75
      Charset         =   204
      Weight          =   400
      Underline       =   0   'False
      Italic          =   -1  'True
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "dodavdec.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8670
   ScaleWidth      =   9375
   Begin VB.Frame Frame1 
      BackColor       =   &H00800000&
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   9
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   0
      TabIndex        =   21
      Top             =   7920
      Width           =   9375
      Begin VB.Label Labe31 
         BackColor       =   &H00FFFFC0&
         BackStyle       =   0  'Transparent
         Caption         =   "Всього: "
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   20.25
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFC0&
         Height          =   495
         Left            =   120
         TabIndex        =   29
         Top             =   165
         Width           =   1455
      End
      Begin VB.Label Label32 
         BackColor       =   &H00FFFFC0&
         BackStyle       =   0  'Transparent
         Caption         =   "Вірно:"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   20.25
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFC0&
         Height          =   495
         Left            =   2400
         TabIndex        =   28
         Top             =   165
         Width           =   1335
      End
      Begin VB.Label Label33 
         BackColor       =   &H00FFFFC0&
         BackStyle       =   0  'Transparent
         Caption         =   "Невірно:"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   20.25
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFC0&
         Height          =   495
         Left            =   4440
         TabIndex        =   27
         Top             =   165
         Width           =   1695
      End
      Begin VB.Label Label34 
         BackColor       =   &H00FFFFC0&
         BackStyle       =   0  'Transparent
         Caption         =   "Оцінка:"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   20.25
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFC0&
         Height          =   495
         Left            =   6960
         TabIndex        =   26
         Top             =   165
         Width           =   1455
      End
      Begin VB.Label Label17 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   21.75
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   495
         Left            =   8520
         TabIndex        =   25
         Top             =   165
         Width           =   615
      End
      Begin VB.Label Label18 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   21.75
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   495
         Left            =   1560
         TabIndex        =   24
         Top             =   165
         Width           =   615
      End
      Begin VB.Label Label19 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   21.75
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   495
         Left            =   3600
         TabIndex        =   23
         Top             =   165
         Width           =   615
      End
      Begin VB.Label Label20 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   21.75
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   495
         Left            =   6120
         TabIndex        =   22
         Top             =   165
         Width           =   615
      End
   End
   Begin VB.CommandButton Command14 
      BackColor       =   &H00FFC0FF&
      Caption         =   ","
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   510
      Left            =   5948
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   20
      Top             =   6720
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command15 
      BackColor       =   &H00FFC0FF&
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5948
      MaskColor       =   &H00800000&
      Picture         =   "dodavdec.frx":08CA
      Style           =   1  'Graphical
      TabIndex        =   19
      ToolTipText     =   "Видалити один символ"
      Top             =   7320
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command13 
      BackColor       =   &H00FFC0FF&
      Caption         =   "9"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5348
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   18
      Top             =   7320
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command12 
      BackColor       =   &H00FFC0FF&
      Caption         =   "8"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4748
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   17
      Top             =   7320
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command11 
      BackColor       =   &H00FFC0FF&
      Caption         =   "7"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4148
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   16
      Top             =   7320
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command10 
      BackColor       =   &H00FFC0FF&
      Caption         =   "6"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3548
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   15
      Top             =   7320
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command9 
      BackColor       =   &H00FFC0FF&
      Caption         =   "5"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2948
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   14
      Top             =   7320
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command8 
      BackColor       =   &H00FFC0FF&
      Caption         =   "4"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5348
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   13
      Top             =   6720
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command7 
      BackColor       =   &H00FFC0FF&
      Caption         =   "3"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4748
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   12
      Top             =   6720
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command6 
      BackColor       =   &H00FFC0FF&
      Caption         =   "2"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4148
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   11
      Top             =   6720
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command5 
      BackColor       =   &H00FFC0FF&
      Caption         =   "1"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3548
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   10
      Top             =   6720
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command4 
      BackColor       =   &H00FFC0FF&
      Caption         =   "0"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2948
      MaskColor       =   &H00800000&
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   6720
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.TextBox Text5 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFC0&
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   65.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF80FF&
      Height          =   1515
      Left            =   1845
      MaxLength       =   8
      TabIndex        =   0
      Text            =   "???"
      ToolTipText     =   "Відповідь вводьте за допомогою кнопок справа наліво"
      Top             =   4200
      Width           =   5685
   End
   Begin VB.CommandButton Command2 
      Appearance      =   0  'Flat
      BackColor       =   &H00FFFFC0&
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   20.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   4148
      Picture         =   "dodavdec.frx":1194
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   6720
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Appearance      =   0  'Flat
      BackColor       =   &H00FFFFC0&
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   7440
      Picture         =   "dodavdec.frx":1DBF
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   7200
      Width           =   1815
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   6885
      Top             =   120
   End
   Begin VB.CommandButton Command3 
      Appearance      =   0  'Flat
      BackColor       =   &H00FFFFC0&
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   20.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   7440
      Picture         =   "dodavdec.frx":2F2F
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   7200
      Width           =   1815
   End
   Begin VB.Label Label30 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFC0&
      BackStyle       =   0  'Transparent
      Caption         =   "+"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   60
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   1215
      Left            =   2280
      TabIndex        =   36
      Top             =   2280
      Width           =   735
   End
   Begin VB.Label Label2 
      BackColor       =   &H00C000C0&
      BackStyle       =   0  'Transparent
      Caption         =   "55"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   60
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   1335
      Left            =   4845
      TabIndex        =   33
      Top             =   1800
      Width           =   2685
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00C000C0&
      BackStyle       =   0  'Transparent
      Caption         =   "33"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   60
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   1335
      Left            =   1845
      TabIndex        =   35
      Top             =   1800
      Width           =   2685
   End
   Begin VB.Label Label4 
      BackColor       =   &H00C000C0&
      BackStyle       =   0  'Transparent
      Caption         =   "91"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   60
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   1335
      Left            =   4845
      TabIndex        =   34
      Top             =   2880
      Width           =   2685
   End
   Begin VB.Label Label7 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFC0&
      BackStyle       =   0  'Transparent
      Caption         =   ","
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   60
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   1335
      Left            =   4485
      TabIndex        =   32
      Top             =   1920
      Width           =   375
   End
   Begin VB.Label Label8 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFC0&
      BackStyle       =   0  'Transparent
      Caption         =   ","
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   60
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   1335
      Left            =   4485
      TabIndex        =   31
      Top             =   2880
      Width           =   375
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00C000C0&
      BackStyle       =   0  'Transparent
      Caption         =   "7"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   60
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   1335
      Left            =   1845
      TabIndex        =   30
      Top             =   2880
      Width           =   2685
   End
   Begin VB.Line Line1 
      BorderColor     =   &H0000FFFF&
      BorderWidth     =   5
      X1              =   1800
      X2              =   7440
      Y1              =   4080
      Y2              =   4080
   End
   Begin VB.Label Label13 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFC0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "00"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   19.5
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   615
      Left            =   7440
      TabIndex        =   6
      Top             =   120
      Width           =   615
   End
   Begin VB.Label Label12 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFC0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "00"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   19.5
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   615
      Left            =   8040
      TabIndex        =   5
      Top             =   120
      Width           =   615
   End
   Begin VB.Label Label11 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFC0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "00"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   19.5
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   615
      Left            =   8640
      TabIndex        =   4
      Top             =   120
      Width           =   615
   End
   Begin VB.Label Label10 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFC0&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Monotype Corsiva"
         Size            =   26.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF80FF&
      Height          =   615
      Left            =   1440
      TabIndex        =   3
      Top             =   6000
      Width           =   6495
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFC0&
      BackStyle       =   0  'Transparent
      Caption         =   "Виконайте додавання :"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   855
      Left            =   368
      TabIndex        =   1
      Top             =   720
      Width           =   8655
   End
End
Attribute VB_Name = "dodavdec"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim a, b, n As Currency
Dim t, t1 As Currency
Dim k, y2, y3, a2, b1, b2, a3, b3, r1, r2, y5, y6, r As String
Dim i, x, d, c, a1, m, y1 As Integer
Dim proggo

Private Sub Command1_Click()
Text5.Text = Trim(Text5.Text)
r = ""
For i = 1 To Len(Text5)
If Mid(Text5, i, 1) <> "," Then r = r + Mid(Text5, i, 1) Else r = r + "."
Next i
If ((d = 1 And Text5 = a + b) Or (d = 2 And Text5 = a - b) Or (d = 2 And Text5 = t) Or (d = 1 And Text5 = t) Or (Text5 = a3)) Or ((d = 1 And r = a + b) Or (d = 2 And r = a - b) Or (d = 2 And r = t) Or (d = 1 And r = t) Or (r = a3)) Then
Label10.Caption = "Правильно!Молодець!"
Label19 = Label19 + 1
Else
Label10.Caption = "Неправильно! "
otvet3.Show
Label20 = Label20 + 1
End If
If Label19.Caption <> 0 Then Label17.Caption = Round(11 * Label19.Caption / Label18.Caption)
Command1.Visible = False
Command4.Visible = False
Command5.Visible = False
Command6.Visible = False
Command7.Visible = False
Command8.Visible = False
Command9.Visible = False
Command10.Visible = False
Command11.Visible = False
Command12.Visible = False
Command13.Visible = False
Command14.Visible = False
Command15.Visible = False
Text5.Enabled = False
Command3.Visible = True
Command3.SetFocus
End Sub

Private Sub Command14_Click()
Text5.Text = "," + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command2_Click()
Text5.Enabled = True
Command4.Visible = True
Command5.Visible = True
Command6.Visible = True
Command7.Visible = True
Command8.Visible = True
Command9.Visible = True
Command10.Visible = True
Command11.Visible = True
Command12.Visible = True
Command13.Visible = True
Command14.Visible = True
Command15.Visible = True
Label11.Caption = "00"
Label12.Caption = "00"
Label13.Caption = "00"
Timer1.Enabled = True
Label1 = ""
Label2 = ""
Label3 = ""
Label4 = ""
Text5 = ""
Zero
Text5.SetFocus
Text5.Text = ""
Randomize
Chisla
Command2.Visible = False
Command1.Visible = False
End Sub

Private Sub Command3_Click()
otvet3.Hide
Label10.Caption = ""
Text5.Enabled = True
Command4.Visible = True
Command5.Visible = True
Command6.Visible = True
Command7.Visible = True
Command8.Visible = True
Command9.Visible = True
Command10.Visible = True
Command11.Visible = True
Command12.Visible = True
Command14.Visible = True
Command13.Visible = True
Command15.Visible = True
Label1 = ""
Label2 = ""
Label3 = ""
Label4 = ""
Text5.Text = ""
Text5.SetFocus
Randomize
Chisla
Command3.Visible = False
Command1.Visible = False
End Sub

Private Sub Form_Load()
'Form1.WindowState = 1
Dither Me
Label18.Caption = 0
Label19.Caption = 0
Label20.Caption = 0
Randomize
c = 0
Command3.Visible = False
Command1.Visible = False
End Sub

Private Sub Timer1_Timer()
Label11.Caption = Label11.Caption + 1
If Label11.Caption > 59 Then
Label11.Caption = "0"
Label12.Caption = Label12.Caption + 1
End If
If Label12.Caption > 59 Then
Label12.Caption = "0"
Label13.Caption = Label13.Caption + 1
End If
If Label13.Caption > 23 Then Label13.Caption = "0"
Zero
End Sub
Private Sub Zero()
If Len(Label11.Caption) < 2 Then Label11.Caption = "0" & Label11.Caption
If Len(Label12.Caption) < 2 Then Label12.Caption = "0" & Label12.Caption
If Len(Label13.Caption) < 2 Then Label13.Caption = "0" & Label13.Caption
End Sub
Private Sub Chisla()
c = c + 1
znak
If d = 1 Then Label5 = "Виконайте додавання:" Else Label5 = "Виконайте віднімання:"
Label18.Caption = Label18.Caption + 1
x = Int(Rnd * 15) + 1
If c = 1 Then x = 1
If c > 1 And c <= 3 Then x = 2
If c >= 4 And c <= 5 Then x = 3
Select Case x
Case 1
1: a = (Int(Rnd * 9) + 1) / 10
b = (Int(Rnd * 9) + 1) / 10
If d = 2 And a <= b Then GoTo 1
If a = 0 Or b = 0 Then GoTo 1
Case 2
2: a = (Int(Rnd * 90) + 10) / 10
b = (Int(Rnd * 90) + 10) / 10
If d = 2 And a <= b Then GoTo 2
If a = 0 Or b = 0 Then GoTo 2
Case 3
3: a = (Int(Rnd * 900) + 100) / 10
b = (Int(Rnd * 900) + 100) / 10
If d = 2 And a <= b Then GoTo 3
If a = 0 Or b = 0 Then GoTo 3
Case 4
4: a = (Int(Rnd * 90) + 10) / 100
b = (Int(Rnd * 90) + 10) / 100
If d = 2 And a <= b Then GoTo 4
If a = 0 Or b = 0 Then GoTo 4
Case 5
5: a = (Int(Rnd * 9) + 1) / 100
b = (Int(Rnd * 9) + 1) / 100
If d = 2 And a <= b Then GoTo 5
If a = 0 Or b = 0 Then GoTo 5
Case 6
6: a = (Int(Rnd * 90) + 10) / 100
b = (Int(Rnd * 90) + 10) / 100
If d = 2 And a <= b Then GoTo 6
If a = 0 Or b = 0 Then GoTo 6
If a = Fix(a) Or b = Fix(b) Then GoTo 6
If d = 1 Then y1 = a + b Else y1 = a - b
If (d = 1 And Len(y1) > 6) Or (d = 2 And Len(y1) > 6) Then GoTo 6
Case 7
7: a = (Int(Rnd * 900) + 100) / 1000
b = (Int(Rnd * 900) + 1) / 1000
If d = 2 And a <= b Then GoTo 7
If a = 0 Or b = 0 Then GoTo 7
Case 8
8: a = (Int(Rnd * 9) + 1) / 1000
b = (Int(Rnd * 9) + 1) / 1000
If d = 2 And a <= b Then GoTo 8
If a = 0 Or b = 0 Then GoTo 8
9: a = (Int(Rnd * 90000) + 10000) / 100
b = (Int(Rnd * 9000) + 1000) / 100
If d = 2 And a <= b Then GoTo 9
If a = 0 Or b = 0 Then GoTo 9
Case 10
10: a = (Int(Rnd * 99999) + 1) / 1000
b = (Int(Rnd * 99999) + 1) / 1000
If d = 2 And a <= b Then GoTo 10
If a = 0 Or b = 0 Then GoTo 10
Case 11 '
11: a = (Int(Rnd * 900) + 100) / 10
b = (Int(Rnd * 9000) + 1000) / 1000
If d = 2 And a <= b Then GoTo 11
If a = 0 Or b = 0 Then GoTo 11
Case 12 '
12: a = (Int(Rnd * 90000) + 10000) / 1000
b = (Int(Rnd * 90000) + 10000) / 1000
If d = 2 And a <= b Then GoTo 12
If a = 0 Or b = 0 Then GoTo 12
Case 13 '
13: a = (Int(Rnd * 90000) + 10000) / 100
b = (Int(Rnd * 900) + 100) / 10
If d = 2 And a <= b Then GoTo 13
If a = 0 Or b = 0 Then GoTo 13
Case 14 '
14: a = (Int(Rnd * 900) + 100) / 10
b = (Int(Rnd * 9000) + 1000) / 100
If d = 2 And a <= b Then GoTo 14
If a = 0 Or b = 0 Then GoTo 14
Case 15 '
15: a = (Int(Rnd * 9000) + 1000) / 1000
b = (Int(Rnd * 9000) + 1000) / 1000
If d = 2 And a <= b Then GoTo 15
If a = 0 Or b = 0 Then GoTo 15
End Select
nuli
End Sub

Private Sub Form_Unload(Cancel As Integer)
y5 = Len(Name)
y6 = App.Path
y6 = Left(y6, Len(y6) - y5)
proggo = Shell(y6 & "start.exe", 1)
End
End Sub
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And Text5 = "" Then
k = MsgBox("Спочатку слід ввести відповідь!", 0, "Помилка користувача")
Else
If KeyCode = 13 Then
Command1.SetFocus
End If
End If
End Sub
Private Sub Text5_Change()
If Text5.Text <> "" Then Command1.Visible = True
End Sub

Private Sub Command4_Click()
Text5.Text = "0" + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command5_Click()
Text5.Text = "1" + Text5.Text
Text5.SetFocus
End Sub
Private Sub Command6_Click()
Text5.Text = "2" + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command7_Click()
Text5.Text = "3" + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command8_Click()
Text5.Text = "4" + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command9_Click()
Text5.Text = "5" + Text5.Text
Text5.SetFocus
End Sub
Private Sub Command10_Click()
Text5.Text = "6" + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command11_Click()
Text5.Text = "7" + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command12_Click()
Text5.Text = "8" + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command13_Click()
Text5.Text = "9" + Text5.Text
Text5.SetFocus
End Sub

Private Sub Command15_Click()
If Text5 = "" Then
k = MsgBox("Спочатку слід ввести відповідь!", 0, "Помилка користувача")
Text5.SetFocus
Else
Text5 = Mid(Text5, 2, Len(Text5))
Text5.SetFocus
End If
End Sub
Private Sub znak()
d = Int(Rnd * 2) + 1
If d = 1 Then Label30.Caption = "+"
If d = 2 Then Label30.Caption = "-"
End Sub
Private Sub nuli()
otvet3.Label1 = Fix(a)
Label1 = Fix(a)
otvet3.Label1.Width = Len(Fix(a)) * 390
Label1.Width = Len(Fix(a)) * 44 'виправила
otvet3.Label1.Left = otvet3.Label7.Left - otvet3.Label1.Width + 80
Label1.Left = Label7.Left - Label1.Width
otvet3.Label3 = Fix(b)
Label3 = Fix(b)
otvet3.Label3.Width = Len(Fix(b)) * 390
Label3.Width = Len(Fix(b)) * 44
otvet3.Label3.Left = otvet3.Label8.Left - otvet3.Label3.Width + 80
Label3.Left = Label8.Left - Label3.Width
y1 = 0
r1 = a
For i = 1 To Len(r1)
If Mid(r1, i, 1) = "." Then y1 = i
Next
If Fix(a) <> a Then
otvet3.Label2 = Mid(r1, y1 + 1, Len(r1) - y1)
Label2 = Mid(r1, y1 + 1, Len(r1) - y1)
Else
otvet3.Label2 = 0
Label2 = 0
End If
y1 = 0
r2 = b
For i = 1 To Len(r2)
If Mid(r2, i, 1) = "." Then y1 = i
Next
If Fix(b) <> b Then
otvet3.Label4 = Mid(r2, y1 + 1, Len(r2) - y1)
Label4 = Mid(r2, y1 + 1, Len(r2) - y1)
Else
otvet3.Label4 = 0
Label4 = 0
End If
If Len(otvet3.Label2) >= Len(otvet3.Label4) Then
    If Len(otvet3.Label2) - Len(otvet3.Label4) = 1 Then otvet3.Label4 = otvet3.Label4 + "0"
    If Len(otvet3.Label2) - Len(otvet3.Label4) = 2 Then otvet3.Label4 = otvet3.Label4 + "00"
    If Len(otvet3.Label2) - Len(otvet3.Label4) = 3 Then otvet3.Label4 = otvet3.Label4 + "000"
Else
    If Len(otvet3.Label4) - Len(otvet3.Label2) = 1 Then otvet3.Label2 = otvet3.Label2 + "0"
    If Len(otvet3.Label4) - Len(otvet3.Label2) = 2 Then otvet3.Label2 = otvet3.Label2 + "00"
    If Len(otvet3.Label4) - Len(otvet3.Label2) = 3 Then otvet3.Label2 = otvet3.Label2 + "000"
    End If
      If Len(otvet3.Label2) >= Len(otvet3.Label4) Then a1 = Len(otvet3.Label2) Else a1 = Len(otvet3.Label4)
    If Len(a) >= Len(b) Then b1 = Len(a) Else b1 = Len(b)
    If d = 1 Then n = a + b Else n = a - b
      m = Fix(n)
      otvet3.Label5 = m
otvet3.Label5.Width = Len(m) * 390
otvet3.Label5.Left = otvet3.Label9.Left - otvet3.Label5.Width + 80
n = Round(n, a1)
y1 = 0
For i = 1 To Len(n)
If Mid(n, i, 1) = "." Then y1 = i
Next
If Fix(n) <> n Then
otvet3.Label6 = Mid(n, y1 + 1, a1)
End If
If n = Fix(n) Then otvet3.Label6 = 0
Do While Len(otvet3.Label6) <> a1
otvet3.Label6 = otvet3.Label6 & "0"
Loop
a3 = otvet3.Label5 & otvet3.Label9 & otvet3.Label6
 If Len(a) >= Len(b) Then
otvet3.Line6.X1 = otvet3.Label1.Left - 390
otvet3.Line6.X2 = otvet3.Label1.Left + otvet3.Label1.Width + otvet3.Label7.Width + Len(otvet3.Label2) * 390 + 390
Else
otvet3.Line6.X1 = otvet3.Label3.Left - 390
otvet3.Line6.X2 = otvet3.Label3.Left + otvet3.Label3.Width + otvet3.Label8.Width + Len(otvet3.Label4) * 390 + 390
End If
If d = 1 Then otvet3.Label30 = "+"
If d = 2 Then otvet3.Label30 = "-"
If Len(otvet3.Label1) >= Len(otvet3.Label3) Then otvet3.Label30.Left = otvet3.Label1.Left - 400 Else otvet3.Label30.Left = otvet3.Label3.Left - 400
Label30.Left = Label1.Left - 80
End Sub
