Private Sub cmdAnswer_Click()
      
      ' This is the Numbers program that I originally created in C++.
      ' I have converted this to Visual Basic just as a way to start learning VB.
      
      Dim Total As Integer
      Dim Num1 As Integer
      Dim Num2 As Integer
      Dim i As Integer
      Dim x As Integer
      Dim y As Integer
      Dim z As Integer
      
      x = 10
      y = 20
      z = 1
      
      Total = txtTotal.Text
      Total = Total - 25
      
      For i = 1 To 10
          If ((x < Total) And (Total < y)) Then
              Num1 = z
              x = 1
          Else
              x = x + 10
              y = y + 10
              z = z + 1
          End If
      Next
      
      z = 1
      
      For i = 1 To 9
          If (((Total - x) Mod 10) = 0) Then
              Num2 = z
          Else
              x = x + 1
              z = z + 1
          End If
      Next
      
      MsgBox "Your first number was: " & Num1 & vbNewLine & "Your second number was: " & Num2, vbExclamation, "Answer!"
      
      End Sub