Лабораторная работа: Умножение и деление целых неотрицательных чисел в двоичном коде
d(c) = x
res.Text = ""
Do
res.Text = res.Text & d(c)
c = c - 1
Loop Until c = 0
Case False
If val(lb2.Caption) > val(lb1.Caption) Then
MsgBox "Incorrect Input. Please input numbers again.", , "=VaMP1r3=™"
Exit Sub
Else
x0 = val(((CDbl(lb1.Caption)) / (CDbl(lb2.Caption))))
x = 0
c = 1
Do
If x0 = 0 Then Exit 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)
c = c - 1
Loop Until c = 0
End If
End Select