VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H80000005&
   Caption         =   "Задание 5.29"
   ClientHeight    =   2544
   ClientLeft      =   3036
   ClientTop       =   3300
   ClientWidth     =   6036
   BeginProperty Font 
      Name            =   "Times New Roman"
      Size            =   11.4
      Charset         =   204
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   2544
   ScaleWidth      =   6036
   Begin VB.CommandButton cmd1 
      Caption         =   "Пуск"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   7.8
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   0
      Top             =   1920
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim intDec, intD, intA As Integer, strBin As String
Private Sub cmd1_Click()
intDec = Val(InputBox("Введите натуральное десятичное число", "Десятичное число", 1))
strBin = " "
intD = intDec
Do While intD > 0
intA = intD Mod 2
If intA = 1 _
Then strBin = "1" + strBin _
Else strBin = "0" + strBin
intD = Int(intD / 2)
Loop
Print "Десятичное число  "; intDec, "Двоичное число  "; strBin
End Sub
