Лабораторная работа: Умножение и деление целых неотрицательных чисел в двоичном коде
j = j + 1
Loop Until i = 0
lb3.Caption = x
End If
End Sub
PrivateSubrun_Click() 'Основная процедура обработки
Dim d(90) As Double
If fir.Text = "" Or sec.Text = "" Then
MsgBox "Incorrect input. Please input numbers again", , "=VaMp1r3=™"
Exit Sub
ElseIf val(lb2.Caption) = 0 Or val(lb1.Caption) = 0 Then
MsgBox "Incorrect input. Please input numbers again", , "=VaMp1r3=™"
Call Command1_Click
Exit Sub
ElseIf val(lb2.Caption) = 0 And val(lb1.Caption) = 0 Then
MsgBox "Incorrect input. Please input numbers again", , "=VaMp1r3=™"
Call Command1_Click
Exit Sub
Else
Select Case umn.Value
Case True
x0 = ((CDbl(lb1.Caption)) * (CDbl(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