Imports System
Public Module Module1
Public Sub Main()
Dim M As Integer = 10
Dim C As Integer = 5
Dim X As Integer = 3
Dim I as Integer = 1
Dim strRoman as String = "MMCCXXIII"
Dim intTotalNum as Integer = 0
For each index as Char in strRoman
If index = "M" Then
intTotalNum += M
ElseIf index = "C" Then
intTotalNum += C
ElseIf index = "X" Then
intTotalNum += X
ElseIf index = "I" Then
intTotalNum += I
End If
Next
Console.WriteLine("Total Num: {0}", intTotalNum)
End Sub
End Module