Professional Documents
Culture Documents
Dim i, j As Integer
i=0
Dim max(100, 100) As String
Dim cont As Integer = 0
Dim alma As Integer = 0
If (Len(TextBoxEntero.Text) >= 1) Then
For i = 1 To Len(TextBoxEntero.Text)
cont += 1
Next
End If
max(0, 0) = "M"
max(0, 1) = 1000
max(1, 0) = "CM"
max(1, 1) = 900
max(2, 0) = "D"
max(2, 1) = 500
max(3, 0) = "CD"
max(3, 1) = 400
max(4, 0) = "C"
max(4, 1) = 100
max(5, 0) = "XC"
max(5, 1) = 90
max(6, 0) = "L"
max(6, 1) = 50
max(7, 0) = "XL"
max(7, 1) = 40
max(8, 0) = "X"
max(8, 1) = 10
max(9, 0) = "IX"
max(9, 1) = 9
max(10, 0) = "V"
max(10, 1) = 5
max(11, 0) = "IV"
max(11, 1) = 4
max(12, 0) = "I"
max(12, 1) = 1
alma = TextBoxEntero.Text
For i = 0 To cont - 1
For j = 0 To cont - 1
If (alma >= 1000) Then
TextBoxRomano.Text += max(0, 0)
alma = alma - CInt(max(0, 1))