Лабораторная работа: Сложение и вычитание целых неотрицательных чисел в двоичном коде
j = j + 1
Loop Until i = 0
lb3.Caption = x
End If
End Sub
Private Sub res_GotFocus()
sel = 3
End Sub
Private Sub run_Click()
Dim d(90) As Integer
If fir.Text = "" Or sec.Text = "" Then
MsgBox "Incorrect input. Please input numbers again", , "=VaMp1r3=™"
Exit Sub
Else
Select Case plus.Value
Case True
x0 = ((CInt(lb1.Caption)) + (CInt(lb2.Caption)))
x = 0
c = 1
Do
d(c) = x0 Mod 2
x = Round((CDbl(x0) / 2) - 0.3, 0)
c = c + 1
x0 = x
Loop Until x = 1
d(c) = x
res.Text = ""
Do
res.Text = res.Text & d(c)