VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00FFFFFF&
   Caption         =   "Перевод чисел"
   ClientHeight    =   3192
   ClientLeft      =   3720
   ClientTop       =   3192
   ClientWidth     =   5088
   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     =   3192
   ScaleWidth      =   5088
   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            =   1680
      TabIndex        =   0
      Top             =   2520
      Width           =   1695
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bytI As Byte, intA, intN, intM, intNum(1 To 13) As Integer, strA, strR, strRim(1 To 13) As String
Private Sub cmd1_Click()
intNum(1) = 1000
intNum(2) = 900
intNum(3) = 500
intNum(4) = 400
intNum(5) = 100
intNum(6) = 90
intNum(7) = 50
intNum(8) = 40
intNum(9) = 10
intNum(10) = 9
intNum(11) = 5
intNum(12) = 4
intNum(13) = 1
strRim(1) = "M"
strRim(2) = "CM"
strRim(3) = "D"
strRim(4) = "CD"
strRim(5) = "C"
strRim(6) = "XC"
strRim(7) = "L"
strRim(8) = "XL"
strRim(9) = "X"
strRim(10) = "IX"
strRim(11) = "V"
strRim(12) = "IV"
strRim(13) = "I"
intN = Val(InputBox("Введите целое десятичное число", "Арабское число", 1))
strR = ""
intM = intN
For bytI = 1 To 13
intA = intNum(bytI)
strA = strRim(bytI)
If intA > intM _
Then intA = intNum(bytI): strA = strRim(bytI) _
Else: strR = strR + strA: intM = intM - intA
If intM = 0 _
Then bytI = 14
Next bytI
Print "Десятичное число"; intN, "Римское число"; strR
End Sub
